[PATCH v5 11/11] ARM: pxa: add clk support in gpio driver

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Oct 27 05:25:44 EDT 2011


On Mon, Oct 17, 2011 at 09:35:17PM +0800, Haojian Zhuang wrote:
> diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
> index 2d20118..d278925 100644
> --- a/drivers/gpio/gpio-pxa.c
> +++ b/drivers/gpio/gpio-pxa.c
> @@ -489,6 +492,14 @@ static int __devinit pxa_gpio_probe(struct platform_device *pdev)
>  	if (irq0 > 0)
>  		gpio_offset = 2;
>  
> +	clk = clk_get(&pdev->dev, NULL);
> +	if (IS_ERR(clk)) {
> +		printk(KERN_ERR "Error %ld to get gpio clock\n", PTR_ERR(clk));

Please use dev_err() for new error printk statements when you have a
struct device available.



More information about the linux-arm-kernel mailing list