diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-04-12 14:45:19 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-04-15 11:32:48 +0200 |
commit | ee535f221c4919a73c226f6f1040c96e35265260 (patch) | |
tree | adb87d97fc692cc8ee139b142604a34e179271ca /backport/backport-include/linux/device.h | |
parent | 160399144468fb69dc36fea0312379b62a40b6e6 (diff) |
backports: dissolve compat-2.6.26.h
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport/backport-include/linux/device.h')
-rw-r--r-- | backport/backport-include/linux/device.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h index 07ebe9f7..f672a99b 100644 --- a/backport/backport-include/linux/device.h +++ b/backport/backport-include/linux/device.h @@ -122,6 +122,14 @@ static inline void device_unlock(struct device *dev) } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) +static inline const char *dev_name(struct device *dev) +{ + /* will be changed into kobject_name(&dev->kobj) in the near future */ + return dev->bus_id; +} +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) static inline void dev_set_uevent_suppress(struct device *dev, int val) { @@ -141,4 +149,10 @@ static inline void dev_set_uevent_suppress(struct device *dev, int val) #define dev_name(dev) dev_name((struct device *)dev) #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) +#define dev_set_name LINUX_BACKPORT(dev_set_name) +extern int dev_set_name(struct device *dev, const char *name, ...) + __attribute__((format(printf, 2, 3))); +#endif + #endif /* __BACKPORT_DEVICE_H */ |