diff options
author | Matthew Wilcox <matthew@wil.cx> | 2008-10-16 17:51:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 13:44:30 -0500 |
commit | 929d2fa5955ab27aa21fac615b23e0e92e8dc3a0 (patch) | |
tree | 7cca230fb8187f2b90543f89715581f4ad81ea77 /include/linux/device.h | |
parent | 7f4f5d4516b441d712fa0ffe5380618fb7fc545e (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/device.h')
-rw-r--r-- | include/linux/device.h | 5 |
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); |