Messages in this thread | | | Date | Fri, 18 Mar 2011 12:49:32 +0100 | From | Wolfram Sang <> | Subject | Re: [PATCH] NFC: Driver for Inside Secure MicroRead NFC chip |
| |
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 <waldemar.rymarkiewicz@tieto.com>
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/ | [unhandled content-type:application/pgp-signature] | |