diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-05-20 00:34:18 -0700 |
---|---|---|
committer | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-05-20 00:34:18 -0700 |
commit | 5ba773ee641c8f938195c2779ea283d7386010c9 (patch) | |
tree | a7f5f69ec4178a4e3df86f7304d5b4b1a7368bdd | |
parent | 6c79d96e5fc0e59aaf956ff4897ddb2824bcf120 (diff) | |
download | compat-wireless-2.6-old-5ba773ee641c8f938195c2779ea283d7386010c9.tar.gz |
Fix 2.6.25 compatibilty -- dev_name() and clamp_val() were added
as of 2.6.26, not as part of 2.6.25.
The reason why I put dev_name() in for 2.6.25 was that git-describe
of v2.6.25-7352-g0691663 (patch with SHA1 0691663, and at that point
a tag of 2.6.25) had dev_name() added. Even the top level Makefile
has 2.6.25... this also applies to clamp_val(). Will investigage
the discrepancy.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
-rw-r--r-- | compat/compat.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compat/compat.h b/compat/compat.h index b7ef5fc..a5a412e 100644 --- a/compat/compat.h +++ b/compat/compat.h @@ -403,14 +403,18 @@ static inline void led_classdev_unregister_suspended(struct led_classdev *lcd) led_classdev_unregister(lcd); } -/* This is from include/linux/device.h, which was added as of 2.6.25 */ +#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) */ + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)) + +/* This is from include/linux/device.h, which was added as of 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; } -/* Added as of 2.6.25 */ +/* This is from include/linux/kernel.h, which was added as of 2.6.26 */ /** * clamp_val - return a value clamped to a given range using val's type @@ -432,10 +436,6 @@ static inline const char *dev_name(struct device *dev) __val > __max ? __max: __val; }) -#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)) */ - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)) - /* 2.6.26 added its own unaligned API which the * new drivers can use. Lets port it here by including it in older * kernels and also deal with the architecture handling here. */ |