aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/ledtrig-usbport.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/core/ledtrig-usbport.c')
-rw-r--r--drivers/usb/core/ledtrig-usbport.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/core/ledtrig-usbport.c b/drivers/usb/core/ledtrig-usbport.c
index 16c19a31dad1..1af877942110 100644
--- a/drivers/usb/core/ledtrig-usbport.c
+++ b/drivers/usb/core/ledtrig-usbport.c
@@ -149,8 +149,8 @@ static bool usbport_trig_port_observed(struct usbport_trig_data *usbport_data,
149 count = of_count_phandle_with_args(led_np, "trigger-sources", 149 count = of_count_phandle_with_args(led_np, "trigger-sources",
150 "#trigger-source-cells"); 150 "#trigger-source-cells");
151 if (count < 0) { 151 if (count < 0) {
152 dev_warn(dev, "Failed to get trigger sources for %s\n", 152 dev_warn(dev, "Failed to get trigger sources for %pOF\n",
153 led_np->full_name); 153 led_np);
154 return false; 154 return false;
155 } 155 }
156 156
@@ -205,6 +205,7 @@ static int usbport_trig_add_port(struct usbport_trig_data *usbport_data,
205 } 205 }
206 snprintf(port->port_name, len, "%s-port%d", hub_name, portnum); 206 snprintf(port->port_name, len, "%s-port%d", hub_name, portnum);
207 207
208 sysfs_attr_init(&port->attr.attr);
208 port->attr.attr.name = port->port_name; 209 port->attr.attr.name = port->port_name;
209 port->attr.attr.mode = S_IRUSR | S_IWUSR; 210 port->attr.attr.mode = S_IRUSR | S_IWUSR;
210 port->attr.show = usbport_trig_port_show; 211 port->attr.show = usbport_trig_port_show;