hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/usb/host/max3421-hcd.c
....@@ -11,9 +11,9 @@
1111 *
1212 * Based on:
1313 * o MAX3421E datasheet
14
- * http://datasheets.maximintegrated.com/en/ds/MAX3421E.pdf
14
+ * https://datasheets.maximintegrated.com/en/ds/MAX3421E.pdf
1515 * o MAX3421E Programming Guide
16
- * http://www.hdl.co.jp/ftpdata/utl-001/AN3785.pdf
16
+ * https://www.hdl.co.jp/ftpdata/utl-001/AN3785.pdf
1717 * o gadget/dummy_hcd.c
1818 * For USB HCD implementation.
1919 * o Arduino MAX3421 driver
....@@ -311,7 +311,7 @@
311311 };
312312
313313 /*
314
- * See http://www.beyondlogic.org/usbnutshell/usb4.shtml#Control for a
314
+ * See https://www.beyondlogic.org/usbnutshell/usb4.shtml#Control for a
315315 * reasonable overview of how control transfers use the the IN/OUT
316316 * tokens.
317317 */
....@@ -895,7 +895,7 @@
895895 spi_wr8(hcd, MAX3421_REG_HCTL,
896896 BIT(sndtog + MAX3421_HCTL_SNDTOG0_BIT));
897897 }
898
- /* FALL THROUGH */
898
+ fallthrough;
899899 case MAX3421_HRSL_BADBC: /* bad byte count */
900900 case MAX3421_HRSL_PIDERR: /* received PID is corrupted */
901901 case MAX3421_HRSL_PKTERR: /* packet error (stuff, EOP) */
....@@ -1695,7 +1695,7 @@
16951695 dev_dbg(hcd->self.controller, "power-off\n");
16961696 max3421_gpout_set_value(hcd, pdata->vbus_gpout,
16971697 !pdata->vbus_active_level);
1698
- /* FALLS THROUGH */
1698
+ fallthrough;
16991699 default:
17001700 max3421_hcd->port_status &= ~(1 << value);
17011701 }
....@@ -1748,7 +1748,7 @@
17481748 break;
17491749 case USB_PORT_FEAT_RESET:
17501750 max3421_reset_port(hcd);
1751
- /* FALLS THROUGH */
1751
+ fallthrough;
17521752 default:
17531753 if ((max3421_hcd->port_status & USB_PORT_STAT_POWER)
17541754 != 0)
....@@ -1780,21 +1780,6 @@
17801780 return -1;
17811781 }
17821782
1783
-/*
1784
- * The SPI driver already takes care of DMA-mapping/unmapping, so no
1785
- * reason to do it twice.
1786
- */
1787
-static int
1788
-max3421_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
1789
-{
1790
- return 0;
1791
-}
1792
-
1793
-static void
1794
-max3421_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb)
1795
-{
1796
-}
1797
-
17981783 static const struct hc_driver max3421_hcd_desc = {
17991784 .description = "max3421",
18001785 .product_desc = DRIVER_DESC,
....@@ -1806,8 +1791,6 @@
18061791 .get_frame_number = max3421_get_frame_number,
18071792 .urb_enqueue = max3421_urb_enqueue,
18081793 .urb_dequeue = max3421_urb_dequeue,
1809
- .map_urb_for_dma = max3421_map_urb_for_dma,
1810
- .unmap_urb_for_dma = max3421_unmap_urb_for_dma,
18111794 .endpoint_disable = max3421_endpoint_disable,
18121795 .hub_status_data = max3421_hub_status_data,
18131796 .hub_control = max3421_hub_control,