lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210121102922.17439-5-johan@kernel.org>
Date:   Thu, 21 Jan 2021 11:29:15 +0100
From:   Johan Hovold <johan@...nel.org>
To:     linux-usb@...r.kernel.org
Cc:     Manivannan Sadhasivam <mani@...nel.org>,
        linux-kernel@...r.kernel.org, Johan Hovold <johan@...nel.org>
Subject: [PATCH 03/10] USB: serial: xr: use subsystem usb_device at probe

Use the subsystem struct usb_device pointer at probe instead of
deriving it from the interface pointer.

Signed-off-by: Johan Hovold <johan@...nel.org>
---
 drivers/usb/serial/xr_serial.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c
index 5e110b0c8e71..8f81f866d681 100644
--- a/drivers/usb/serial/xr_serial.c
+++ b/drivers/usb/serial/xr_serial.c
@@ -541,7 +541,6 @@ static void xr_close(struct usb_serial_port *port)
 
 static int xr_probe(struct usb_serial *serial, const struct usb_device_id *id)
 {
-	struct usb_device *usb_dev = interface_to_usbdev(serial->interface);
 	struct usb_driver *driver = serial->type->usb_driver;
 	struct usb_interface *control_interface;
 	int ret;
@@ -551,7 +550,7 @@ static int xr_probe(struct usb_serial *serial, const struct usb_device_id *id)
 		return -ENODEV;
 
 	/* But claim the control interface during data interface probe */
-	control_interface = usb_ifnum_to_if(usb_dev, 0);
+	control_interface = usb_ifnum_to_if(serial->dev, 0);
 	if (!control_interface)
 		return -ENODEV;
 
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ