Commit a864e3aa authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c5be1b52
...@@ -552,8 +552,8 @@ static struct attribute *dev_string_attrs[] = { ...@@ -552,8 +552,8 @@ static struct attribute *dev_string_attrs[] = {
static mode_t dev_string_attrs_are_visible(struct kobject *kobj, static mode_t dev_string_attrs_are_visible(struct kobject *kobj,
struct attribute *a, int n) struct attribute *a, int n)
{ {
struct usb_device *udev = to_usb_device( struct device *dev = container_of(kobj, struct device, kobj);
container_of(kobj, struct device, kobj)); struct usb_device *udev = to_usb_device(dev);
if (a == &dev_attr_manufacturer.attr) { if (a == &dev_attr_manufacturer.attr) {
if (udev->manufacturer == NULL) if (udev->manufacturer == NULL)
...@@ -585,8 +585,8 @@ static ssize_t ...@@ -585,8 +585,8 @@ static ssize_t
read_descriptors(struct kobject *kobj, struct bin_attribute *attr, read_descriptors(struct kobject *kobj, struct bin_attribute *attr,
char *buf, loff_t off, size_t count) char *buf, loff_t off, size_t count)
{ {
struct usb_device *udev = to_usb_device( struct device *dev = container_of(kobj, struct device, kobj);
container_of(kobj, struct device, kobj)); struct usb_device *udev = to_usb_device(dev);
size_t nleft = count; size_t nleft = count;
size_t srclen, n; size_t srclen, n;
int cfgno; int cfgno;
...@@ -786,8 +786,8 @@ static struct attribute *intf_assoc_attrs[] = { ...@@ -786,8 +786,8 @@ static struct attribute *intf_assoc_attrs[] = {
static mode_t intf_assoc_attrs_are_visible(struct kobject *kobj, static mode_t intf_assoc_attrs_are_visible(struct kobject *kobj,
struct attribute *a, int n) struct attribute *a, int n)
{ {
struct usb_interface *intf = to_usb_interface( struct device *dev = container_of(kobj, struct device, kobj);
container_of(kobj, struct device, kobj)); struct usb_interface *intf = to_usb_interface(dev);
if (intf->intf_assoc == NULL) if (intf->intf_assoc == NULL)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment