mirror of https://gitee.com/openkylin/linux.git
usb: dwc3: use dev_get_platdata()
Use the wrapper function for retrieving the platform_data instead of accessing dev->platform_data directly. While at that also make change 'node' initialization to use the dev pointer. Inspired-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
f074245960
commit
941ea3616c
|
@ -350,11 +350,11 @@ static void dwc3_core_exit(struct dwc3 *dwc)
|
||||||
|
|
||||||
static int dwc3_probe(struct platform_device *pdev)
|
static int dwc3_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct dwc3_platform_data *pdata = pdev->dev.platform_data;
|
struct device *dev = &pdev->dev;
|
||||||
struct device_node *node = pdev->dev.of_node;
|
struct dwc3_platform_data *pdata = dev_get_platdata(dev);
|
||||||
|
struct device_node *node = dev->of_node;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
struct dwc3 *dwc;
|
struct dwc3 *dwc;
|
||||||
struct device *dev = &pdev->dev;
|
|
||||||
|
|
||||||
int ret = -ENOMEM;
|
int ret = -ENOMEM;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue