forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/usb/host/isp1362-hcd.c
....@@ -1748,7 +1748,7 @@
17481748 isp1362_hcd->hc_control &= ~OHCI_CTRL_HCFS;
17491749 isp1362_hcd->hc_control |= OHCI_USB_RESET;
17501750 isp1362_write_reg32(isp1362_hcd, HCCONTROL, isp1362_hcd->hc_control);
1751
- /* FALL THROUGH */
1751
+ fallthrough;
17521752 case OHCI_USB_RESET:
17531753 status = -EBUSY;
17541754 pr_warn("%s: needs reinit!\n", __func__);
....@@ -2159,25 +2159,15 @@
21592159
21602160 return 0;
21612161 }
2162
-
2163
-static int isp1362_open(struct inode *inode, struct file *file)
2164
-{
2165
- return single_open(file, isp1362_show, inode);
2166
-}
2167
-
2168
-static const struct file_operations debug_ops = {
2169
- .open = isp1362_open,
2170
- .read = seq_read,
2171
- .llseek = seq_lseek,
2172
- .release = single_release,
2173
-};
2162
+DEFINE_SHOW_ATTRIBUTE(isp1362);
21742163
21752164 /* expect just one isp1362_hcd per system */
21762165 static void create_debug_file(struct isp1362_hcd *isp1362_hcd)
21772166 {
21782167 isp1362_hcd->debug_file = debugfs_create_file("isp1362", S_IRUGO,
21792168 usb_debug_root,
2180
- isp1362_hcd, &debug_ops);
2169
+ isp1362_hcd,
2170
+ &isp1362_fops);
21812171 }
21822172
21832173 static void remove_debug_file(struct isp1362_hcd *isp1362_hcd)
....@@ -2637,7 +2627,7 @@
26372627 {
26382628 struct usb_hcd *hcd;
26392629 struct isp1362_hcd *isp1362_hcd;
2640
- struct resource *addr, *data, *irq_res;
2630
+ struct resource *data, *irq_res;
26412631 void __iomem *addr_reg;
26422632 void __iomem *data_reg;
26432633 int irq;
....@@ -2655,19 +2645,13 @@
26552645 if (pdev->num_resources < 3)
26562646 return -ENODEV;
26572647
2658
- if (pdev->dev.dma_mask) {
2659
- DBG(1, "won't do DMA");
2660
- return -ENODEV;
2661
- }
2662
-
26632648 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
26642649 if (!irq_res)
26652650 return -ENODEV;
26662651
26672652 irq = irq_res->start;
26682653
2669
- addr = platform_get_resource(pdev, IORESOURCE_MEM, 1);
2670
- addr_reg = devm_ioremap_resource(&pdev->dev, addr);
2654
+ addr_reg = devm_platform_ioremap_resource(pdev, 1);
26712655 if (IS_ERR(addr_reg))
26722656 return PTR_ERR(addr_reg);
26732657