[PATCH] device core: fix a copy-paste error

From: Alan Stern
Date: Tue May 08 2012 - 15:09:00 EST


This patch (as1552) fixes a fairly obvious copy-paste error that could
have serious consequences on architectures where sizeof(int) !=
sizeof(unsigned long).

Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
CC: <stable@xxxxxxxxxxxxxxx>

---

This just caught my eye while I was adding another macro immediately
below DEVICE_INT_ATTR.


include/linux/device.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: usb-3.4/include/linux/device.h
===================================================================
--- usb-3.4.orig/include/linux/device.h
+++ usb-3.4/include/linux/device.h
@@ -502,7 +502,7 @@ ssize_t device_store_int(struct device *
{ __ATTR(_name, _mode, device_show_ulong, device_store_ulong), &(_var) }
#define DEVICE_INT_ATTR(_name, _mode, _var) \
struct dev_ext_attribute dev_attr_##_name = \
- { __ATTR(_name, _mode, device_show_ulong, device_store_ulong), &(_var) }
+ { __ATTR(_name, _mode, device_show_int, device_store_int), &(_var) }

extern int device_create_file(struct device *device,
const struct device_attribute *entry);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/