aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2008-10-16 17:51:35 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 13:44:30 -0500
commit929d2fa5955ab27aa21fac615b23e0e92e8dc3a0 (patch)
tree7cca230fb8187f2b90543f89715581f4ad81ea77 /include/linux
parent7f4f5d4516b441d712fa0ffe5380618fb7fc545e (diff)
driver core: Rearrange struct device for better packing
This minor rearrangement saves 16 bytes from sizeof(struct device) according to pahole. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 4a520051c315..4e14fad41430 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -373,9 +373,9 @@ struct device {
373 373
374 struct kobject kobj; 374 struct kobject kobj;
375 char bus_id[BUS_ID_SIZE]; /* position on parent bus */ 375 char bus_id[BUS_ID_SIZE]; /* position on parent bus */
376 unsigned uevent_suppress:1;
376 const char *init_name; /* initial name of the device */ 377 const char *init_name; /* initial name of the device */
377 struct device_type *type; 378 struct device_type *type;
378 unsigned uevent_suppress:1;
379 379
380 struct semaphore sem; /* semaphore to synchronize calls to 380 struct semaphore sem; /* semaphore to synchronize calls to
381 * its driver. 381 * its driver.
@@ -408,12 +408,13 @@ struct device {
408 /* arch specific additions */ 408 /* arch specific additions */
409 struct dev_archdata archdata; 409 struct dev_archdata archdata;
410 410
411 dev_t devt; /* dev_t, creates the sysfs "dev" */
412
411 spinlock_t devres_lock; 413 spinlock_t devres_lock;
412 struct list_head devres_head; 414 struct list_head devres_head;
413 415
414 struct klist_node knode_class; 416 struct klist_node knode_class;
415 struct class *class; 417 struct class *class;
416 dev_t devt; /* dev_t, creates the sysfs "dev" */
417 struct attribute_group **groups; /* optional groups */ 418 struct attribute_group **groups; /* optional groups */
418 419
419 void (*release)(struct device *dev); 420 void (*release)(struct device *dev);