aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2009-04-15 21:34:40 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-15 21:44:41 -0700
commita864e3aa5d8e1278c05aa93c57dba0debbb46858 (patch)
tree5f01488ae06e6802c32f037d8e2d6fee6ad52952 /drivers/usb/core
parentc5be1b52d9ea6ede4931691bf9f0bd454515aa52 (diff)
USB: core/sysfs: fix sparse warnings
Fix 3 sparse warning in drivers/usb/core/sysfs.c. warning: symbol '__mptr' shadows an earlier one Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/sysfs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index c6678919792..b5c72e45894 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -552,8 +552,8 @@ static struct attribute *dev_string_attrs[] = {
static mode_t dev_string_attrs_are_visible(struct kobject *kobj,
struct attribute *a, int n)
{
- struct usb_device *udev = to_usb_device(
- container_of(kobj, struct device, kobj));
+ struct device *dev = container_of(kobj, struct device, kobj);
+ struct usb_device *udev = to_usb_device(dev);
if (a == &dev_attr_manufacturer.attr) {
if (udev->manufacturer == NULL)
@@ -585,8 +585,8 @@ static ssize_t
read_descriptors(struct kobject *kobj, struct bin_attribute *attr,
char *buf, loff_t off, size_t count)
{
- struct usb_device *udev = to_usb_device(
- container_of(kobj, struct device, kobj));
+ struct device *dev = container_of(kobj, struct device, kobj);
+ struct usb_device *udev = to_usb_device(dev);
size_t nleft = count;
size_t srclen, n;
int cfgno;
@@ -786,8 +786,8 @@ static struct attribute *intf_assoc_attrs[] = {
static mode_t intf_assoc_attrs_are_visible(struct kobject *kobj,
struct attribute *a, int n)
{
- struct usb_interface *intf = to_usb_interface(
- container_of(kobj, struct device, kobj));
+ struct device *dev = container_of(kobj, struct device, kobj);
+ struct usb_interface *intf = to_usb_interface(dev);
if (intf->intf_assoc == NULL)
return 0;