diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-03-13 17:07:03 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-19 19:10:26 -0700 |
commit | 3f62e5700b2a679ae987b32a68126dd6dcf2488f (patch) | |
tree | 4f8eda958d328b6fc068409c0fb464bc7c21266b /include/linux/device.h | |
parent | 9a3df1f7de0ecaf77a1dde86f2a4dc020f37f87e (diff) |
Driver core: make device_is_registered() work for class devices
device_is_registered() can use the kobject value for this, so it will
now work with devices that are associated with only a class, not a bus
and a driver.
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index d7a1ae063b65..441461f5ee20 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -429,7 +429,6 @@ struct device { struct kobject kobj; char bus_id[BUS_ID_SIZE]; /* position on parent bus */ struct device_type *type; - unsigned is_registered:1; unsigned uevent_suppress:1; struct semaphore sem; /* semaphore to synchronize calls to @@ -509,7 +508,7 @@ static inline void dev_set_drvdata(struct device *dev, void *data) static inline int device_is_registered(struct device *dev) { - return dev->is_registered; + return dev->kobj.state_in_sysfs; } void driver_init(void); |