Re: [PATCH v4 1/2] Input: DaVinci Keypad Driver

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

 



Dmitry,

+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.
The address for __raw_{write/read}* should be void __iomem *, davinci_ks->base
should already be the correct type due to ioremap().

You can probably just change the whole thing to:

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


Better yet, use __raw_readl() and __raw_writel() directly - there is no
need for wrappers that just rename existig functions not adding any
additional functionality.


Yes, I just test it with your patch and it worked fine.

Thanks,

Miguel Aguilar
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux