summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2008-10-16 15:51:35 -0600
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 10:44:30 -0800
commit929d2fa5955ab27aa21fac615b23e0e92e8dc3a0 (patch)
tree7cca230fb8187f2b90543f89715581f4ad81ea77
parent7f4f5d4516b441d712fa0ffe5380618fb7fc545e (diff)
downloadlinux-3.10-929d2fa5955ab27aa21fac615b23e0e92e8dc3a0.tar.gz
linux-3.10-929d2fa5955ab27aa21fac615b23e0e92e8dc3a0.tar.bz2
linux-3.10-929d2fa5955ab27aa21fac615b23e0e92e8dc3a0.zip
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>
-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 4a520051c31..4e14fad4143 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -373,9 +373,9 @@ struct device {
struct kobject kobj;
char bus_id[BUS_ID_SIZE]; /* position on parent bus */
+ unsigned uevent_suppress:1;
const char *init_name; /* initial name of the device */
struct device_type *type;
- unsigned uevent_suppress:1;
struct semaphore sem; /* semaphore to synchronize calls to
* its driver.
@@ -408,12 +408,13 @@ struct device {
/* arch specific additions */
struct dev_archdata archdata;
+ dev_t devt; /* dev_t, creates the sysfs "dev" */
+
spinlock_t devres_lock;
struct list_head devres_head;
struct klist_node knode_class;
struct class *class;
- dev_t devt; /* dev_t, creates the sysfs "dev" */
struct attribute_group **groups; /* optional groups */
void (*release)(struct device *dev);