RE: [PATCH 7/9] i2c-designware: Allow mixed endianness accesses

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

 



> +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.

jh
--
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


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux