mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 04:30:52 +07:00
usb: mtu3: simplify getting .drvdata
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8bffbdb6d8
commit
f86c6888dd
@ -447,8 +447,7 @@ static int mtu3_remove(struct platform_device *pdev)
|
|||||||
*/
|
*/
|
||||||
static int __maybe_unused mtu3_suspend(struct device *dev)
|
static int __maybe_unused mtu3_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct ssusb_mtk *ssusb = dev_get_drvdata(dev);
|
||||||
struct ssusb_mtk *ssusb = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
dev_dbg(dev, "%s\n", __func__);
|
dev_dbg(dev, "%s\n", __func__);
|
||||||
|
|
||||||
@ -466,8 +465,7 @@ static int __maybe_unused mtu3_suspend(struct device *dev)
|
|||||||
|
|
||||||
static int __maybe_unused mtu3_resume(struct device *dev)
|
static int __maybe_unused mtu3_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct ssusb_mtk *ssusb = dev_get_drvdata(dev);
|
||||||
struct ssusb_mtk *ssusb = platform_get_drvdata(pdev);
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
dev_dbg(dev, "%s\n", __func__);
|
dev_dbg(dev, "%s\n", __func__);
|
||||||
|
Loading…
Reference in New Issue
Block a user