hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/usb/musb/musb_dsps.c
....@@ -36,7 +36,7 @@
3636
3737 static const struct of_device_id musb_dsps_of_match[];
3838
39
-/**
39
+/*
4040 * DSPS musb wrapper register offset.
4141 * FIXME: This should be expanded to have all the wrapper registers from TI DSPS
4242 * musb ips.
....@@ -96,7 +96,7 @@
9696 u32 rx_mode;
9797 };
9898
99
-/**
99
+/*
100100 * DSPS glue structure.
101101 */
102102 struct dsps_glue {
....@@ -162,14 +162,13 @@
162162
163163 #define USBSS_IRQ_PD_COMP (1 << 2)
164164
165
-/**
165
+/*
166166 * dsps_musb_enable - enable interrupts
167167 */
168168 static void dsps_musb_enable(struct musb *musb)
169169 {
170170 struct device *dev = musb->controller;
171
- struct platform_device *pdev = to_platform_device(dev->parent);
172
- struct dsps_glue *glue = platform_get_drvdata(pdev);
171
+ struct dsps_glue *glue = dev_get_drvdata(dev->parent);
173172 const struct dsps_musb_wrapper *wrp = glue->wrp;
174173 void __iomem *reg_base = musb->ctrl_base;
175174 u32 epmask, coremask;
....@@ -189,14 +188,13 @@
189188 dsps_mod_timer(glue, -1);
190189 }
191190
192
-/**
191
+/*
193192 * dsps_musb_disable - disable HDRC and flush interrupts
194193 */
195194 static void dsps_musb_disable(struct musb *musb)
196195 {
197196 struct device *dev = musb->controller;
198
- struct platform_device *pdev = to_platform_device(dev->parent);
199
- struct dsps_glue *glue = platform_get_drvdata(pdev);
197
+ struct dsps_glue *glue = dev_get_drvdata(dev->parent);
200198 const struct dsps_musb_wrapper *wrp = glue->wrp;
201199 void __iomem *reg_base = musb->ctrl_base;
202200
....@@ -234,7 +232,7 @@
234232 dsps_mod_timer_optional(glue);
235233 break;
236234 }
237
- /* fall through */
235
+ fallthrough;
238236
239237 case OTG_STATE_A_WAIT_BCON:
240238 /* keep VBUS on for host-only mode */
....@@ -244,7 +242,7 @@
244242 }
245243 musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
246244 skip_session = 1;
247
- /* fall through */
245
+ fallthrough;
248246
249247 case OTG_STATE_A_IDLE:
250248 case OTG_STATE_B_IDLE:
....@@ -413,7 +411,7 @@
413411 char buf[128];
414412
415413 sprintf(buf, "%s.dsps", dev_name(musb->controller));
416
- root = debugfs_create_dir(buf, NULL);
414
+ root = debugfs_create_dir(buf, usb_debug_root);
417415 glue->dbgfs_root = root;
418416
419417 glue->regset.regs = dsps_musb_regs;
....@@ -797,7 +795,7 @@
797795 case USB_SPEED_SUPER:
798796 dev_warn(dev, "ignore incorrect maximum_speed "
799797 "(super-speed) setting in dts");
800
- /* fall through */
798
+ fallthrough;
801799 default:
802800 config->maximum_speed = USB_SPEED_HIGH;
803801 }