From: Christophe Lucas <clucas@rotomalug.org>
Subject: [KJ] [PATCH] sizeof(*dev) : arch/arm/common/sa1111.c

when using sizeof consider using the variable and not the type, that way
if the type of the variable is changed we don't have to go seaching
all instances of sizeof(type).

Signed-off-by: Christophe Lucas <clucas@rotomalug.org>

---
 sa1111.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Index: quilt/arch/arm/common/sa1111.c
===================================================================
--- quilt.orig/arch/arm/common/sa1111.c
+++ quilt/arch/arm/common/sa1111.c
@@ -543,12 +543,12 @@ sa1111_init_one_child(struct sa1111 *sac
 	struct sa1111_dev *dev;
 	int ret;
 
-	dev = kmalloc(sizeof(struct sa1111_dev), GFP_KERNEL);
+	dev = kmalloc(sizeof(*dev), GFP_KERNEL);
 	if (!dev) {
 		ret = -ENOMEM;
 		goto out;
 	}
-	memset(dev, 0, sizeof(struct sa1111_dev));
+	memset(dev, 0, sizeof(*dev));
 
 	snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id),
 		 "%4.4lx", info->offset);
@@ -623,11 +623,11 @@ __sa1111_probe(struct device *me, struct
 	unsigned int has_devs, val;
 	int i, ret = -ENODEV;
 
-	sachip = kmalloc(sizeof(struct sa1111), GFP_KERNEL);
+	sachip = kmalloc(sizeof(*sachip), GFP_KERNEL);
 	if (!sachip)
 		return -ENOMEM;
 
-	memset(sachip, 0, sizeof(struct sa1111));
+	memset(sachip, 0, sizeof(*sachip));
 
 	spin_lock_init(&sachip->lock);
 
@@ -812,7 +812,7 @@ static int sa1111_suspend(struct device 
 	if (level != SUSPEND_DISABLE)
 		return 0;
 
-	save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL);
+	save = kmalloc(sizeof(*save), GFP_KERNEL);
 	if (!save)
 		return -ENOMEM;
 	dev->power.saved_state = save;
