[alsa-devel] [PATCH v4 14/14] ASoC: SOF: Add utils

Takashi Iwai tiwai at suse.de
Thu Feb 14 14:33:30 CET 2019


On Wed, 13 Feb 2019 23:07:34 +0100,
Pierre-Louis Bossart wrote:
> 
> +void sof_io_write(struct snd_sof_dev *sdev, void __iomem *addr, u32 value)
> +{
> +	writel(value, addr);
> +}
> +EXPORT_SYMBOL(sof_io_write);
> +
> +u32 sof_io_read(struct snd_sof_dev *sdev, void __iomem *addr)
> +{
> +	return readl(addr);
> +}
> +EXPORT_SYMBOL(sof_io_read);
> +
> +void sof_io_write64(struct snd_sof_dev *sdev, void __iomem *addr, u64 value)
> +{
> +	writeq(value, addr);
> +}
> +EXPORT_SYMBOL(sof_io_write64);
> +
> +u64 sof_io_read64(struct snd_sof_dev *sdev, void __iomem *addr)
> +{
> +	return readq(addr);
> +}
> +EXPORT_SYMBOL(sof_io_read64);

What's the merit of these wrappers?
Even if they are good for consistency, they can be well inlined.


thanks,

Takashi


More information about the Alsa-devel mailing list