From patchwork Sat Jul 6 10:00:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aditya Garg X-Patchwork-Id: 811164 Received: from IND01-MAX-obe.outbound.protection.outlook.com (mail-maxind01olkn2101.outbound.protection.outlook.com [40.92.102.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97D313399F; Sat, 6 Jul 2024 10:00:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.102.101 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720260027; cv=fail; b=qq12yFGLmVrOit2jbxR+5xBylKLU4zuObLFK4Z6lEftGD7cxWt/VeDYXKcdrL/8JpZ14Iur74z74ippTp5cdnR76f3lml8ijFOWyxNomtLGMw/VuQJGcPabx1G9Xz3HAr2j9WaF9USnMSDZj5PQBx7vX8pJc9qzS+drYC6KxNS8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720260027; c=relaxed/simple; bh=OFkKgxXvXQfLZf6Ayy/9sggFpDnWcjmfVYgIhHtU4ak=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=brin4cH1Uc+67JnnfJRKW2tbaEPxqltb/fTfEYtV/P7xuZztaV2fl+SXOM4b8BpR8ooxxG905lucfA3Zvr2O+qeO8fwNuityQF2+11CnpVvJBzSlF44h2krZFxemdTlH2RWNoZGMrcvNZ+q6WgCSBTYeP0ndakRh4hAgV938tek= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=live.com; spf=pass smtp.mailfrom=live.com; dkim=pass (2048-bit key) header.d=live.com header.i=@live.com header.b=Gx1eHaev; arc=fail smtp.client-ip=40.92.102.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=live.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=live.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=live.com header.i=@live.com header.b="Gx1eHaev" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OdDG6PrkQ/fw8ZzKmQX8W56Nx/iAE/KsK4pk1SMcDjwbGRC79wac+978J/HXVrj6aWvwZg3xkyWA+Vtm0n/GMouJS77q+32A00BE2IoUqOyb1/XG5+xqn4OIN5h82e7ZxtakkcaQa3ewRWFAZFzciCzJIUYWHp7xCKhGE1/gKpw4u3h9KPzkIJxdSv60bbo0KEu8SKeiZe+lG6xHtFc3PsUJeM2QELIRqOmSyFGc0/xf5xv+sUBbPFlWjElwCGfr4Lhym3G88lRqBCIZW9A8QaATOArje9cswq5c2wvgh1lJE7ZFzzZwbc/AUXj6vZyuMVhr6ASSb8zf92inM7VNVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kwcLnKkbwNtSh+Fo870t0RFr7qhod0dYfmejPREligA=; b=ZGUvHgTx6kcWVj9GTEt5qkJbSlp285Jx/YJXWB/4FZCU1n2TxKmowepjpvE3vI0yGC9Xb4t8kvfGKvOt6F/v3nd3ypvfTd0VRir3UZPH2GHdfIR6rnUkDqKTpiGQbZTTlTDu0Y81x3oa5J+SgQdfDOBEaFAXOyYUHEZmCsOTjndlny+rahJxEkokhCzyENqPW6qS3BKT82i5LjHesSnttcchEucWFIuaodtVfNv3c0F3hGnjHH8jDcLkOQoo70634UbET+vTaJf0+1iSMh9nk/BnU3RdYkZzGrsiB/6KaJVxtchnhat0mvi39x4frNsbCXTPIYNVveEkBzC/0ReaBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kwcLnKkbwNtSh+Fo870t0RFr7qhod0dYfmejPREligA=; b=Gx1eHaevctBWFjaujoPZAi6QOlIb1y3YMq8tsCXXlD5mqmxpwSSJMBj8Q5qjj/ZEQf1u+TKUJEE/UzukPf+e83fAv4/RHlyfCxMzzI54wwaHPaEpJbLrfCfX1VfpR1SSq1uyDSSp+PwrK9OPeDZaSNarKpRewjwpPmlF//SiMCnUY9JGCV8Pje42/ZzMMaPrkQGBKTnbF2JV2l7fZQPJhmcqgxxJGwH3mqx5sVfagYZL4kylvBdF6l05kDXXUfBxHACMrw1DSzo64OYRhETB9IIzmyo5pkYsypNCiwdQwnRkN3oT9tZyaQAJ2qXb+4W/OJ8R5lNGrB+CyxiX1kgD4Q== Received: from MA0P287MB0217.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:b3::9) by PN2P287MB1372.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:1a5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.33; Sat, 6 Jul 2024 10:00:19 +0000 Received: from MA0P287MB0217.INDP287.PROD.OUTLOOK.COM ([fe80::98d2:3610:b33c:435a]) by MA0P287MB0217.INDP287.PROD.OUTLOOK.COM ([fe80::98d2:3610:b33c:435a%4]) with mapi id 15.20.7741.031; Sat, 6 Jul 2024 10:00:19 +0000 From: Aditya Garg To: "gregkh@linuxfoundation.org" , "oneukum@suse.com" , "stern@rowland.harvard.edu" CC: Kerem Karabay , Orlando Chamberlain , Linux Kernel Mailing List , "linux-usb@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "usb-storage@lists.one-eyed-alien.net" Subject: [PATCH v2 1/2] USB: core: add 'shutdown' callback to usb_driver Thread-Topic: [PATCH v2 1/2] USB: core: add 'shutdown' callback to usb_driver Thread-Index: AQHaz4tO1SR07ZiOs02hIhmy4nGDzg== Date: Sat, 6 Jul 2024 10:00:19 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [4EiUMzB2V+nZeooo+yOotsRAE7uv42s9oIloJ29GFCul71g9/mfMIFvbPiDFBsDPMipJedcTzJc=] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MA0P287MB0217:EE_|PN2P287MB1372:EE_ x-ms-office365-filtering-correlation-id: 71622f64-c780-474f-cc9d-08dc9da27157 x-microsoft-antispam: BCL:0; ARA:14566002|461199028|8060799006|19110799003|440099028|3412199025|102099032; x-microsoft-antispam-message-info: 7N4a8d2ZZR+ibRxGY1hAe6ieqlVB/N8snOTfpvPXl5CU/bVJAQbSnILdqG2SmxKBfJ1tXqj7BIUpByRecxkbB9333mUSFPfNtOjHwBjAzn80UDdWCG+CnnmVsk+3lzlADAzPty3fGwmm8KJ2GmPYmtZIyXN8jSaa+SrOjAqXGzRwfyOg3kxwu2FIb18IcYfbp778RDlQIewIjh5yp+479d3pGPU94HIBCmKrL9mD+2geVvS0ASpifBkw1ZNvxPqr6YDPtQotes6N7xYCypSLuTxTIZVzqmcDLW73She7sw9WzQLcjIa5+yfv2K9TYptaB7rnpk30CPLArbzO3qIxnhWYN3P31tf4nNSUtcp33fxQT0HTbMSSdemxeVUMl83WDnUjFaBT5xFkwkpDHMQEnKkQ8Lb71fsG7OcbpNECIjkw7GwCBwSwmsS+odMWpX87PMRAVu0B9BLNXEp3HhanGLsW4kxwgTqZ/sra+5MqDalupCPCjdfawnoGx4XAMQnypB6zKy6mgsVJZIfeJb4Gs9vmEyfq4WO1WHEmTWvTP6iDVUEl4zGt+jcvGgTNb75/Nrmyd1RFxYoraUsy5SDrSQ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YLeCoLRg5WyBLpC4VqOCbA2cC8DD53Fgaft6ugLiIN0KR6PP9HMlEN3JVrGeKLV8LtDowJy4woCKxVJ4RNPRgXJFPCV/hh66h58SEeFASnxvLLUW7KGrmMTNlgPyWiGiwUCYl7fCq1bwaHLVu1o20jCF0kaABaCNauMAIaD28KOoXGu9TWZ6B2XyY7BTyJdQebZE6z79LFoni0S9/eJdeiQMwNdgXFbsuBM91BirMrG2FDxG5z9NTSeuWaKjFxiQZ7DngfmV4BNjXqawpzQfzBBG0GEC6MIa8340ys0PZcrambc4HyguSXyNr0wzV0JetlUUpBBUulEaM8y8DT7c8ATTpp1NKeW+eyRwcEFKEMfXjWvxyns4tfNjF0Uyq8 Content-ID: <5D1E6FA22EA4A94190EA2BFB9BEB0E2B@INDP287.PROD.OUTLOOK.COM> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-7719-20-msonline-outlook-24072.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MA0P287MB0217.INDP287.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 71622f64-c780-474f-cc9d-08dc9da27157 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jul 2024 10:00:19.1584 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN2P287MB1372 From: Kerem Karabay Currently there is no standardized method for USB drivers to handle shutdown events. This patch simplifies running code on shutdown for USB devices by adding a shutdown callback to usb_driver. Signed-off-by: Kerem Karabay Signed-off-by: Aditya Garg --- drivers/usb/core/driver.c | 14 ++++++++++++++ include/linux/usb.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index e02ba15f6..b35734d03 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -517,6 +517,19 @@ static int usb_unbind_interface(struct device *dev) return 0; } +static void usb_shutdown_interface(struct device *dev) +{ + struct usb_interface *intf = to_usb_interface(dev); + struct usb_driver *driver; + + if (!dev->driver) + return; + + driver = to_usb_driver(dev->driver); + if (driver->shutdown) + driver->shutdown(intf); +} + /** * usb_driver_claim_interface - bind a driver to an interface * @driver: the driver to be bound @@ -1059,6 +1072,7 @@ int usb_register_driver(struct usb_driver *new_driver, struct module *owner, new_driver->driver.bus = &usb_bus_type; new_driver->driver.probe = usb_probe_interface; new_driver->driver.remove = usb_unbind_interface; + new_driver->driver.shutdown = usb_shutdown_interface; new_driver->driver.owner = owner; new_driver->driver.mod_name = mod_name; new_driver->driver.dev_groups = new_driver->dev_groups; diff --git a/include/linux/usb.h b/include/linux/usb.h index 1913a1383..832997a9d 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1171,6 +1171,7 @@ extern ssize_t usb_show_dynids(struct usb_dynids *dynids, char *buf); * post_reset method is called. * @post_reset: Called by usb_reset_device() after the device * has been reset + * @shutdown: Called at shut-down time to quiesce the device. * @id_table: USB drivers use ID table to support hotplugging. * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set * or your driver's probe function will never get called. @@ -1222,6 +1223,8 @@ struct usb_driver { int (*pre_reset)(struct usb_interface *intf); int (*post_reset)(struct usb_interface *intf); + void (*shutdown)(struct usb_interface *intf); + const struct usb_device_id *id_table; const struct attribute_group **dev_groups; From patchwork Sat Jul 6 10:01:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aditya Garg X-Patchwork-Id: 811099 Received: from IND01-BMX-obe.outbound.protection.outlook.com (mail-bmxind01olkn2106.outbound.protection.outlook.com [40.92.103.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F20003399F; Sat, 6 Jul 2024 10:01:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.103.106 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720260105; cv=fail; b=Ps2ZSn5HmREkwZYmZ1FTguqmx92XxGqZWmfGSkNp35XkJB8JSH8pxEercVQ7pr7SHzk8Dq7BQem60dJYhL9WNBcH3VGs5QLBEMZP+9ixFOdCMxHFQ/KO/We5w3pojB10nnNeOBhq7l1IklXSxeq2WgpcDgmQJwmmrMD8WufXsZ8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720260105; c=relaxed/simple; bh=YvUlN4v6Eo3B57Jw2+X0blCq2Htl1h7zf2cnPyOviC4=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=OcjOuV3XHmWHrLYg0nivbbpIH8CHvok8GCSey1CRCt0ccPC4akdU39RpgS27sBmrHdnoCvY0NQDBi3D2YUT4RmJVVHDJDAKEotf5AfoYtp3hPm9wlJpH3mZYKOTQhlYTYw+NlvyjS3E/xTpZm2RoDnE6S5pF/LLZpPp4bBJ2zg4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=live.com; spf=pass smtp.mailfrom=live.com; dkim=pass (2048-bit key) header.d=live.com header.i=@live.com header.b=loX+f5yM; arc=fail smtp.client-ip=40.92.103.106 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=live.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=live.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=live.com header.i=@live.com header.b="loX+f5yM" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MEhBBVq64vN+AYHzuGDwASBLA8ywxRLRb27FrywRUBW7+IDflwulfV2Rdl8lj2xJJEYEV9Hs5MTqBvDObq6kV/3z1VTSMXFJl0vX30gMDj5h+MhObGEpAYwdiy4EAGJisuigs0piKUkk+hkT+eCZhVHbHBDZ1nDYrVv044FFHwxosyuKjH27w/BE3tQNVqHDtzPdeURVcktFF3b/iA5YjuQiaYbZevsM2J8KcNP+qNxPoP1VGcz3rOditurcxl7dTnUFuLaV9umWSaHl4aOFWcZa1udMe8Yzvbux3hNRSDQsAH5VhjW2HSA3Jg7k7lS21HnIxqsYCKx6L3jKoGD4ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IFjMji8+ZX2RUdQlqvZpqojMNot+BRk3/n7pqXudwuE=; b=QzVYe9WANFrA39g6W9s3BThmVT5RP3/sQ5+teWpG72ZII7cmTtJmJ21RfwOx8BXNZEReHWRVe1sBHsetbNlmjT29SqEMm0ZN6N5IeFE3cIwYv5kMkJIv/B1XPPUr0egPKTx8D1XhW5DapnsN+gcB3hRBxuzQc49qK83cxGQJ9e1+gOKGS4OK8PZDccL1FLuAzplpnwn0QbSMruaL0Is5ezSW/Ima8TWRuBeuizDObQX8+cPBwqLwJ1xyOKcGWEe0qYR7NJoykV4iFM6e2mmvKxYg9KhYl71NgPOw6zGpcqf8aiWNPeIRAH3IoRaclboQJjjhYgnLhAaI2NTGr2EY5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IFjMji8+ZX2RUdQlqvZpqojMNot+BRk3/n7pqXudwuE=; b=loX+f5yM7hkpoLU3cBU/qvXEcx14f3vocOkj0MmETqgjxD/msX0QaI2QrVVTaJP6mwQIwjP+klVzy+FOPjJDL8pXyCWTlEJdG0E+rLFkrRQV9khAOyZrM/TjJWUNonGlVTjbuVWXk0Ns023vh2zCqFvxdVGdXLMuRcVtPLSk/JxTn2vvSmt8n7elv0SKay5aYePgpSRw5UPVTnUt3jCsMJkbBUf47yWTZrSyeiVJvS/MWeYBAqgeKLRmqAv3BumCBwGvo3ZXTEGr5w8XISp4PDp5cGK4wSZKj4GVV8UaWolKDT25i8tTIYAuhvIlCdCsdYOkgHdodmD7eaBicylK1w== Received: from MA0P287MB0217.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:b3::9) by PN2P287MB1372.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:1a5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.33; Sat, 6 Jul 2024 10:01:38 +0000 Received: from MA0P287MB0217.INDP287.PROD.OUTLOOK.COM ([fe80::98d2:3610:b33c:435a]) by MA0P287MB0217.INDP287.PROD.OUTLOOK.COM ([fe80::98d2:3610:b33c:435a%4]) with mapi id 15.20.7741.031; Sat, 6 Jul 2024 10:01:38 +0000 From: Aditya Garg To: "gregkh@linuxfoundation.org" , "oneukum@suse.com" , "stern@rowland.harvard.edu" CC: Kerem Karabay , Orlando Chamberlain , Linux Kernel Mailing List , "linux-usb@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "usb-storage@lists.one-eyed-alien.net" Subject: [PATCH v2 2/2] scsi: usb: uas: Implement the new shutdown callback Thread-Topic: [PATCH v2 2/2] scsi: usb: uas: Implement the new shutdown callback Thread-Index: AQHaz4t+VjkiMxF+7kWm0GtAei2JZA== Date: Sat, 6 Jul 2024 10:01:38 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [pwObd6efDSo5L+n51THClYj64pmXlzlR4hhgqZrXw9FvJqeYQkeQmecd4ZtaVn/g6yWNUeLNXQI=] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MA0P287MB0217:EE_|PN2P287MB1372:EE_ x-ms-office365-filtering-correlation-id: c2ed1494-49b5-4d21-63a1-08dc9da2a099 x-microsoft-antispam: BCL:0; ARA:14566002|461199028|8060799006|19110799003|440099028|3412199025|102099032; x-microsoft-antispam-message-info: Vgz5ZHmBuaGT7XnpoXYNu/xYfoh9fg/Lyro8G7QCKkEuXOErwxgDVF8yVXL+R/rHiBAD7iATI1TRDIjgLc2fcj3cWFFwLSLIgQtBYAxWkH+YNvNIWy+R4qsBV/LShVAIonrePMBoRCQGd1PPFtJwcdUyMFiSiaXX8faDrN1xLnd5AWB5Ae7DJuavqjQAL0KKmitQy4ESF2B9y/Bem8BReFcA0gFOvJmjW6Se2fTpwse4mcIz0qMVSU8OmEyRAH/wPNuMWDH+mRUJ+X3bwqkwmdhs7AmkAlE0yA58mFUXAUoSc7yXKzx5ER0x8BUdEKrwtaRBlrNTppk98WKiDjOAW3Pn31c65tPk/rtQQe9JO0HjAWoJM+Okyg2S+EbSUKhgAZqiUNf03+6y4uggZkcx04Gzh3b9Twgpb9MtW/A/Qf63eh67gMKSSSJwg8eF84C/YUrPy0zqLcnxwkzh4vfb9rF+jRhyepPb0hXfSJdMPaSFrUnB1jxbADNCyC0++Z7tc5/F5kAJwepdUlMV0Y0PY56jo1oetZkqC8U9zu7cxmXmsQMC3hxrEqSds6L3K5wKPrjMsJ7pRL8HNK8topy3VKPVKyikEQEEcrDfUACKnEyWlMs8e9sM86JBTJCB4wNCxPfaHVAoKGrVqPcb6o+O+w== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messag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SgAFr8xllZ37WrZxh20zGhC9rQ2zEKyvjq/6tuNU7Q/UzZ7eR5nNBFGTcSRHgYi6bEMEqflbnnYLbGRb1YqboE3CUrKPM92+lSDP0Hs3g/uqDV59gjon4Ac2HmD9yAcc88QBdeoVb0oG6d9+M+qhqNTu0gBsnauBHK/J7FOlYHD8VbMTP09tjisBazQyMcmkJJskNj6JNKQNH/U69aZNIdO5SuYWxm9qJMwsY5l6XbpJ7vl71Rtsbe1hlPWZj9y+hEXLDLrOg2QBejmn3E Content-ID: <19EB418F74654444830B8815E68C0254@INDP287.PROD.OUTLOOK.COM> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-7719-20-msonline-outlook-24072.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MA0P287MB0217.INDP287.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: c2ed1494-49b5-4d21-63a1-08dc9da2a099 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jul 2024 10:01:38.4084 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN2P287MB1372 From: Kerem Karabay This patch implements the new shutdown callback method added to usb_driver on the UAS driver. Signed-off-by: Kerem Karabay Signed-off-by: Aditya Garg --- 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, };