]> git.openfabrics.org - ~tnikolova/compat/.git/commitdiff
compat: fix compilation warning for compat_firmware_class on 2.6.26
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Sat, 25 Feb 2012 02:48:49 +0000 (18:48 -0800)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Sat, 25 Feb 2012 02:48:49 +0000 (18:48 -0800)
This fixes this compilation issue:

  CC [M]  /home/mcgrof/compat/compat/compat_firmware_class.o
/home/mcgrof/compat/compat/compat_firmware_class.c:24:0: warning: "to_dev" redefined
include/linux/input.h:1218:0: note: this is the location of the previous definition
/home/mcgrof/compat/compat/compat_firmware_class.c:24:0: warning: "to_dev" redefined
include/linux/input.h:1218:0: note: this is the location of the previous definition

Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
compat/compat_firmware_class.c

index 4eb5ba7e89e12c1570374041ba1c9132bb07db68..b08567784a070df388b8748a85a1b5ace143605e 100644 (file)
 #include <linux/firmware.h>
 #include <linux/slab.h>
 
+#ifdef to_dev
+#undef to_dev
 #define to_dev(obj) container_of(obj, struct device, kobj)
+#endif
 
 MODULE_AUTHOR("Manuel Estrada Sainz");
 MODULE_DESCRIPTION("Multi purpose firmware loading support");