Skip to contentSkip to conversation

phy-rcar-gen2-usb: always use 'dev' variable in probe() method

PATCH In review Ben Dooks 1 participant 1 message Mar 6, 2014

Subsystems (3)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 2/9 phy-rcar-gen2-usb: always use 'dev' variable in probe() method

From: Sergei Shtylyov <[email protected]>

The probe() method has the 'dev' local variable declared and used but strangely not in all cases where it should be...

---
Cc: Felipe Balbi <[email protected]>

---
 drivers/usb/phy/phy-rcar-gen2-usb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/phy/phy-rcar-gen2-usb.c +3 -3
index 551e0a6..388d89f 100644
@@ -177,15 +177,15 @@ static int rcar_gen2_usb_phy_probe(struct platform_device *pdev)
 	struct clk *clk;
 	int retval;
 
-	pdata = dev_get_platdata(&pdev->dev);
+	pdata = dev_get_platdata(dev);
 	if (!pdata) {
 		dev_err(dev, "No platform data\n");
 		return -EINVAL;
 	}
 
-	clk = devm_clk_get(&pdev->dev, "usbhs");
+	clk = devm_clk_get(dev, "usbhs");
 	if (IS_ERR(clk)) {
-		dev_err(&pdev->dev, "Can't get the clock\n");
+		dev_err(dev, "Can't get the clock\n");
 		return PTR_ERR(clk);
 	}
 
Signature · 1 line
1.9.0