From: Aditya Garg <gargaditya08@live.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"oneukum@suse.com" <oneukum@suse.com>,
"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>
Cc: Kerem Karabay <kekrby@gmail.com>,
Orlando Chamberlain <orlandoch.dev@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"usb-storage@lists.one-eyed-alien.net"
<usb-storage@lists.one-eyed-alien.net>
Subject: [PATCH v3 2/2] USB: uas: Implement the new shutdown callback
Date: Sat, 6 Jul 2024 12:04:49 +0000 [thread overview]
Message-ID: <E3A502A9-6572-4F1B-9EB2-2F6F0C4E6EA8@live.com> (raw)
In-Reply-To: <7AAC1BF4-8B60-448D-A3C1-B7E80330BE42@live.com>
From: Kerem Karabay <kekrby@gmail.com>
A standard implementation of shutdown callback has been implemented
for USB drivers. Since the UAS driver implements a shutdown callback
this patch enables it to use the new standard implementation.
Signed-off-by: Kerem Karabay <kekrby@gmail.com>
Signed-off-by: Aditya Garg <gargaditya08@live.com>
---
drivers/usb/storage/uas.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index b610a2de4..0cdbcf825 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -1232,9 +1232,8 @@ static void uas_disconnect(struct usb_interface *intf)
* hang on reboot when the device is still in uas mode. Note the reset is
* necessary as some devices won't revert to usb-storage mode without it.
*/
-static void uas_shutdown(struct device *dev)
+static void uas_shutdown(struct usb_interface *intf)
{
- struct usb_interface *intf = to_usb_interface(dev);
struct usb_device *udev = interface_to_usbdev(intf);
struct Scsi_Host *shost = usb_get_intfdata(intf);
struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata;
@@ -1257,7 +1256,7 @@ static struct usb_driver uas_driver = {
.suspend = uas_suspend,
.resume = uas_resume,
.reset_resume = uas_reset_resume,
- .driver.shutdown = uas_shutdown,
+ .shutdown = uas_shutdown,
.id_table = uas_usb_ids,
};
--
2.43.0
next prev parent reply other threads:[~2024-07-06 12:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-06 12:02 [PATCH v3 0/2] USB: Simplify running code on shutdown for USB devices Aditya Garg
2024-07-06 12:03 ` [PATCH v3 1/2] USB: core: add 'shutdown' callback to usb_driver Aditya Garg
2024-07-06 12:04 ` Aditya Garg [this message]
2024-07-06 12:36 ` gregkh
2024-07-06 12:46 ` Aditya Garg
2024-07-06 12:56 ` Aditya Garg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E3A502A9-6572-4F1B-9EB2-2F6F0C4E6EA8@live.com \
--to=gargaditya08@live.com \
--cc=gregkh@linuxfoundation.org \
--cc=kekrby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=orlandoch.dev@gmail.com \
--cc=stern@rowland.harvard.edu \
--cc=usb-storage@lists.one-eyed-alien.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®