]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
driver core: Rearrange struct device for better packing
authorMatthew Wilcox <matthew@wil.cx>
Thu, 16 Oct 2008 21:51:35 +0000 (15:51 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Jan 2009 18:44:30 +0000 (10:44 -0800)
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>
include/linux/device.h

index 4a520051c31584291a3d884ac6471b32bd18ad43..4e14fad414302c674fc13cbf88387e4e623e2ec5 100644 (file)
@@ -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);