| .. | .. |
|---|
| 1748 | 1748 | isp1362_hcd->hc_control &= ~OHCI_CTRL_HCFS; |
|---|
| 1749 | 1749 | isp1362_hcd->hc_control |= OHCI_USB_RESET; |
|---|
| 1750 | 1750 | isp1362_write_reg32(isp1362_hcd, HCCONTROL, isp1362_hcd->hc_control); |
|---|
| 1751 | | - /* FALL THROUGH */ |
|---|
| 1751 | + fallthrough; |
|---|
| 1752 | 1752 | case OHCI_USB_RESET: |
|---|
| 1753 | 1753 | status = -EBUSY; |
|---|
| 1754 | 1754 | pr_warn("%s: needs reinit!\n", __func__); |
|---|
| .. | .. |
|---|
| 2159 | 2159 | |
|---|
| 2160 | 2160 | return 0; |
|---|
| 2161 | 2161 | } |
|---|
| 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); |
|---|
| 2174 | 2163 | |
|---|
| 2175 | 2164 | /* expect just one isp1362_hcd per system */ |
|---|
| 2176 | 2165 | static void create_debug_file(struct isp1362_hcd *isp1362_hcd) |
|---|
| 2177 | 2166 | { |
|---|
| 2178 | 2167 | isp1362_hcd->debug_file = debugfs_create_file("isp1362", S_IRUGO, |
|---|
| 2179 | 2168 | usb_debug_root, |
|---|
| 2180 | | - isp1362_hcd, &debug_ops); |
|---|
| 2169 | + isp1362_hcd, |
|---|
| 2170 | + &isp1362_fops); |
|---|
| 2181 | 2171 | } |
|---|
| 2182 | 2172 | |
|---|
| 2183 | 2173 | static void remove_debug_file(struct isp1362_hcd *isp1362_hcd) |
|---|
| .. | .. |
|---|
| 2637 | 2627 | { |
|---|
| 2638 | 2628 | struct usb_hcd *hcd; |
|---|
| 2639 | 2629 | struct isp1362_hcd *isp1362_hcd; |
|---|
| 2640 | | - struct resource *addr, *data, *irq_res; |
|---|
| 2630 | + struct resource *data, *irq_res; |
|---|
| 2641 | 2631 | void __iomem *addr_reg; |
|---|
| 2642 | 2632 | void __iomem *data_reg; |
|---|
| 2643 | 2633 | int irq; |
|---|
| .. | .. |
|---|
| 2655 | 2645 | if (pdev->num_resources < 3) |
|---|
| 2656 | 2646 | return -ENODEV; |
|---|
| 2657 | 2647 | |
|---|
| 2658 | | - if (pdev->dev.dma_mask) { |
|---|
| 2659 | | - DBG(1, "won't do DMA"); |
|---|
| 2660 | | - return -ENODEV; |
|---|
| 2661 | | - } |
|---|
| 2662 | | - |
|---|
| 2663 | 2648 | irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
|---|
| 2664 | 2649 | if (!irq_res) |
|---|
| 2665 | 2650 | return -ENODEV; |
|---|
| 2666 | 2651 | |
|---|
| 2667 | 2652 | irq = irq_res->start; |
|---|
| 2668 | 2653 | |
|---|
| 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); |
|---|
| 2671 | 2655 | if (IS_ERR(addr_reg)) |
|---|
| 2672 | 2656 | return PTR_ERR(addr_reg); |
|---|
| 2673 | 2657 | |
|---|