Dmitry,

Dmitry Torokhov wrote:
Hi Miguel,

On Fri, Oct 09, 2009 at 11:27:05AM -0600, [email protected] wrote:
From: Miguel Aguilar <[email protected]>

Adds the driver for enabling keypad support for DaVinci platforms.

DM365 is the only platform that uses this driver at the moment.


Looks pretty good, I have one question:

+static void davinci_ks_write(struct davinci_ks *davinci_ks, u32 val, u32 addr)
+{
+       u32 base = (u32)davinci_ks->base;
+
+       __raw_writel(val,(u32 *)(base + addr));
+}

Do you really need these casts? I'd think that bare __raw_writel would
work just fine.

+
+static u32 davinci_ks_read(struct davinci_ks *davinci_ks, u32 addr)
+{
+       u32 base = (u32)davinci_ks->base;
+
+       return __raw_readl((u32 *)(base + addr));
+}

Could you also please try the patch below and let me know if it breaks
things. Also iof you coulr run sparse over the driver that would be
nice.

Thanks!


Thanks for the patch, I will add it and resend the whole patch.

Just one thing failed:

+fail6:
+       free_irq(davinci_ks->irq);

this must be:

        free_irq(davinci_ks->irq, davinci_ks);

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to