Hi Waldemar, On Fri, Mar 18, 2011 at 11:40:24AM +0100, Waldemar Rymarkiewicz wrote: > Add new driver for MicroRead NFC chip connected to i2c bus. > > See Documentation/nfc/nfc-microread.txt. > > Signed-off-by: Waldemar Rymarkiewicz <[email protected]>
Besides the stuff Alan mentioned...
> +struct microread_nfc_platform_data {
> + unsigned int rst_gpio;
> + unsigned int irq_gpio;
> + unsigned int ioh_gpio;
... you should request and setup the GPIOs before using them.
> +free_irq:
> + free_irq(client->irq, info);
> +free_buf:
> + kfree(info->buf);
> +free_info:
> + kfree(info);
> +
> + dev_info(&client->dev, "Not probed.");
> + return ret;
> +}
When respinning, you could consider using managed devices (devm_*);
this error path could completely go then.
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
signature.asc
Description: Digital signature
