Re: [PATCH] usb: dwc3: use dev_get_platdata()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 31-07-2013 10:22, Felipe Balbi wrote:

Use the wrapper function for retrieving the
platform_data instead of accessing dev->platform_data
directly.

Inspired-by: Jingoo Han  <jg1.han@xxxxxxxxxxx>
Signed-off-by: Felipe Balbi <balbi@xxxxxx>
---
  drivers/usb/dwc3/core.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index da0a4b8..aa48abd 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -350,11 +350,11 @@ static void dwc3_core_exit(struct dwc3 *dwc)

  static int dwc3_probe(struct platform_device *pdev)
  {
-	struct dwc3_platform_data *pdata = pdev->dev.platform_data;
+	struct device		*dev = &pdev->dev;
+	struct dwc3_platform_data *pdata = dev_get_platdata(dev);
  	struct device_node	*node = pdev->dev.of_node;

   Why not use your 'dev' variable also here?

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux