On 01/24/2011 06:28 PM, Shinya Kuribayashi wrote:
On 1/18/2011 2:19 AM, Jean-Hugues Deschenes wrote:
+u32 dw_readl(struct dw_i2c_dev *dev, int offset)
+{
+ u32 value = readl(dev->base + offset);
+
+ if (dev->swab)
+ return swab32(value);
+ else
+ return value;
+}
+EXPORT_SYMBOL(dw_readl);
+
+void dw_writel(struct dw_i2c_dev *dev, u32 b, int offset)
+{
+ if (dev->swab)
+ b = swab32(b);
+
+ writel(b, dev->base + offset);
+}
+EXPORT_SYMBOL(dw_writel);
I would just suggest to declare these accessors as static and avoid to
export the symbols, especially given their short names. Inlining these
short, frequently-accessed functions is attractive.
+extern u32 dw_readl(struct dw_i2c_dev *dev, int offset);
+extern void dw_writel(struct dw_i2c_dev *dev, u32 b, int offset);
Same here; I don't believe these lines are necessary.
Ack.
Furthermore, I'd like to see this patch at the start at Dirk-san's
patchset. We don't want to make a already proposed patch adapted to
a modified driver.
ack
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html