usb: xhci: tegra: fix compilation with lockdep enabled
Alban Bedel [Tue, 12 May 2015 08:34:09 +0000 (13:34 +0530)]
The sysfs_attr_init() macro expects a pointer to a struct attribute as
argument and not a pointer to a struct device_attribute. This was
bulding with lockdep disabled because in this case the
sysfs_attr_init() macro does nothing.

Bug 1618089

Change-Id: I6225c5c26beccae3848d8d5360a0efabcba60ce5
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/741614
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

drivers/usb/host/xhci-tegra.c

index 0e494dd..da83737 100644 (file)
@@ -4264,7 +4264,7 @@ static int hsic_power_create_file(struct tegra_xhci_hcd *tegra)
                tegra->hsic_power_attr[p].show = hsic_power_show;
                tegra->hsic_power_attr[p].store = hsic_power_store;
                tegra->hsic_power_attr[p].attr.mode = (S_IRUGO | S_IWUSR);
-               sysfs_attr_init(&tegra->hsic_power_attr[p]);
+               sysfs_attr_init(&tegra->hsic_power_attr[p].attr);
 
                err = device_create_file(dev, &tegra->hsic_power_attr[p]);
                if (err) {