[PATCH 02/10] i2c: pasemi: Use io{read,write}32
Arnd Bergmann
arnd at arndb.de
Mon Sep 27 00:39:31 PDT 2021
On Sun, Sep 26, 2021 at 12:00 PM Sven Peter <sven at svenpeter.dev> wrote:
>
> In preparation for splitting this driver up into a platform_driver
> and a pci_driver, replace outl/inl usage with ioport_map and
> ioread32/iowrite32.
>
> Signed-off-by: Sven Peter <sven at svenpeter.dev>
>
> + smbus->ioaddr = ioport_map(smbus->base, smbus->size);
> + if (!smbus->ioaddr) {
> + error = -EBUSY;
> + goto out_release_region;
> + }
While this works, I would suggest using the more regular pci_iomap()
or pcim_iomap() helper to turn the port number into an __iomem token.
Arnd
More information about the linux-arm-kernel
mailing list