Re: [PATCH 02/10] i2c: pasemi: Use io{read,write}32

From
Arnd Bergmann <arnd@arndb.de>
Date
2021-09-27 07:39:52
Also in
linux-i2c, linuxppc-dev, lkml
Reply to
Sven Peter, 2021-09-26
On Sun, Sep 26, 2021 at 12:00 PM Sven Peter [off-list ref] 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 <redacted>

+       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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (18 messages) 18 messages, 4 authors, last reply 2021-10-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help