Re: [PATCH V2 08/14] MIPS: lantiq: convert falcon gpio to clkdev api

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

 



Hello.

On 23-02-2012 20:03, John Crispin wrote:

The falcon gpio clocks used to be enabled when registering the platform device.
Move this code into the driver and use clkdev api.

Signed-off-by: John Crispin<blogic@xxxxxxxxxxx>
[...]

diff --git a/arch/mips/lantiq/falcon/gpio.c b/arch/mips/lantiq/falcon/gpio.c
index b7611d7..89c9896 100644
--- a/arch/mips/lantiq/falcon/gpio.c
+++ b/arch/mips/lantiq/falcon/gpio.c
[...]
@@ -332,6 +333,14 @@ falcon_gpio_probe(struct platform_device *pdev)
  		goto err;
  	}

+	gpio_port->clk = clk_get(&pdev->dev, NULL);
+	if (!gpio_port->clk) {

   clk_get() returns error, not NULL. So you should use IS_ERR(gpio_port->clk).

+		dev_err(&pdev->dev, "Could not get clock\n");
+		ret = -ENOENT;

	ret = PTR_ERR(gpio_port->clk);

WBR, Sergei



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux