* [PATCH -next] usb: dwc3: dwc3-octeon: remove unnecessary platform_set_drvdata()
@ 2023-08-10 1:51 Yang Yingliang
2023-08-10 9:46 ` Ladislav Michl
0 siblings, 1 reply; 3+ messages in thread
From: Yang Yingliang @ 2023-08-10 1:51 UTC (permalink / raw)
To: linux-usb; +Cc: Thinh.Nguyen, gregkh, yangyingliang
Remove unnecessary platform_set_drvdata(..., NULL) in ->remove(),
the driver_data will be cleared in device_unbind_cleanup() after
calling ->remove() in driver call code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/usb/dwc3/dwc3-octeon.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/dwc3/dwc3-octeon.c b/drivers/usb/dwc3/dwc3-octeon.c
index 6b6581057345..356347780c15 100644
--- a/drivers/usb/dwc3/dwc3-octeon.c
+++ b/drivers/usb/dwc3/dwc3-octeon.c
@@ -517,7 +517,6 @@ static void dwc3_octeon_remove(struct platform_device *pdev)
struct dwc3_octeon *octeon = platform_get_drvdata(pdev);
of_platform_depopulate(octeon->dev);
- platform_set_drvdata(pdev, NULL);
}
static const struct of_device_id dwc3_octeon_of_match[] = {
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] usb: dwc3: dwc3-octeon: remove unnecessary platform_set_drvdata()
2023-08-10 1:51 [PATCH -next] usb: dwc3: dwc3-octeon: remove unnecessary platform_set_drvdata() Yang Yingliang
@ 2023-08-10 9:46 ` Ladislav Michl
2023-08-10 12:31 ` Yang Yingliang
0 siblings, 1 reply; 3+ messages in thread
From: Ladislav Michl @ 2023-08-10 9:46 UTC (permalink / raw)
To: Yang Yingliang; +Cc: linux-usb, Thinh.Nguyen, gregkh
On Thu, Aug 10, 2023 at 09:51:17AM +0800, Yang Yingliang wrote:
> Remove unnecessary platform_set_drvdata(..., NULL) in ->remove(),
> the driver_data will be cleared in device_unbind_cleanup() after
> calling ->remove() in driver call code.
Isn't the same true also for dwc3-imx8mp, dwc3-keystone and dwc3-am62.c?
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/usb/dwc3/dwc3-octeon.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-octeon.c b/drivers/usb/dwc3/dwc3-octeon.c
> index 6b6581057345..356347780c15 100644
> --- a/drivers/usb/dwc3/dwc3-octeon.c
> +++ b/drivers/usb/dwc3/dwc3-octeon.c
> @@ -517,7 +517,6 @@ static void dwc3_octeon_remove(struct platform_device *pdev)
> struct dwc3_octeon *octeon = platform_get_drvdata(pdev);
>
> of_platform_depopulate(octeon->dev);
> - platform_set_drvdata(pdev, NULL);
> }
>
> static const struct of_device_id dwc3_octeon_of_match[] = {
> --
> 2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] usb: dwc3: dwc3-octeon: remove unnecessary platform_set_drvdata()
2023-08-10 9:46 ` Ladislav Michl
@ 2023-08-10 12:31 ` Yang Yingliang
0 siblings, 0 replies; 3+ messages in thread
From: Yang Yingliang @ 2023-08-10 12:31 UTC (permalink / raw)
To: Ladislav Michl; +Cc: linux-usb, Thinh.Nguyen, gregkh, yangyingliang
On 2023/8/10 17:46, Ladislav Michl wrote:
> On Thu, Aug 10, 2023 at 09:51:17AM +0800, Yang Yingliang wrote:
>> Remove unnecessary platform_set_drvdata(..., NULL) in ->remove(),
>> the driver_data will be cleared in device_unbind_cleanup() after
>> calling ->remove() in driver call code.
> Isn't the same true also for dwc3-imx8mp, dwc3-keystone and dwc3-am62.c?
Yes, I can squash them in one patch.
Thanks,
Yang
>
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>> ---
>> drivers/usb/dwc3/dwc3-octeon.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/usb/dwc3/dwc3-octeon.c b/drivers/usb/dwc3/dwc3-octeon.c
>> index 6b6581057345..356347780c15 100644
>> --- a/drivers/usb/dwc3/dwc3-octeon.c
>> +++ b/drivers/usb/dwc3/dwc3-octeon.c
>> @@ -517,7 +517,6 @@ static void dwc3_octeon_remove(struct platform_device *pdev)
>> struct dwc3_octeon *octeon = platform_get_drvdata(pdev);
>>
>> of_platform_depopulate(octeon->dev);
>> - platform_set_drvdata(pdev, NULL);
>> }
>>
>> static const struct of_device_id dwc3_octeon_of_match[] = {
>> --
>> 2.25.1
> .
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-10 12:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10 1:51 [PATCH -next] usb: dwc3: dwc3-octeon: remove unnecessary platform_set_drvdata() Yang Yingliang
2023-08-10 9:46 ` Ladislav Michl
2023-08-10 12:31 ` Yang Yingliang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox