ata fixes for 6.1-rc4
2 driver fixes for rc4:
- Fix the PIO mode configuration of the pdc20230 (pata_legacy) driver.
This also removes a compilation warning with clang and W=1, from
Sergey.
- Fix devm_platform_ioremap_resource() return value check in the palmld
driver, from Yang.
-----BEGIN PGP SIGNATURE-----
iHUEABYKAB0WIQSRPv8tYSvhwAzJdzjdoc3SxdoYdgUCY2Q1zgAKCRDdoc3SxdoY
djL/AQCa2W5VnUSItXms+iltCY7UGjZxeR8XtwqoJpG9OHd7kQEAvzucbZAJPEdb
X4fbvOidGLOfqrtjP2lzAFpvbigFGgw=
=XhAC
-----END PGP SIGNATURE-----
Merge tag 'ata-6.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata
Pull ata fixes from Damien Le Moal:
"Two driver fixes:
- Fix the PIO mode configuration of the pdc20230 (pata_legacy)
driver. This also removes a compilation warning with clang and W=1
(Sergey)
- Fix devm_platform_ioremap_resource() return value check in the
palmld driver (Yang)"
* tag 'ata-6.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
ata: palmld: fix return value check in palmld_pata_probe()
ata: pata_legacy: fix pdc20230_set_piomode()
This commit is contained in:
commit
ee6050c8af
2 changed files with 5 additions and 4 deletions
|
|
@ -315,9 +315,10 @@ static void pdc20230_set_piomode(struct ata_port *ap, struct ata_device *adev)
|
|||
outb(inb(0x1F4) & 0x07, 0x1F4);
|
||||
|
||||
rt = inb(0x1F3);
|
||||
rt &= 0x07 << (3 * adev->devno);
|
||||
rt &= ~(0x07 << (3 * !adev->devno));
|
||||
if (pio)
|
||||
rt |= (1 + 3 * pio) << (3 * adev->devno);
|
||||
rt |= (1 + 3 * pio) << (3 * !adev->devno);
|
||||
outb(rt, 0x1F3);
|
||||
|
||||
udelay(100);
|
||||
outb(inb(0x1F2) | 0x01, 0x1F2);
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ static int palmld_pata_probe(struct platform_device *pdev)
|
|||
|
||||
/* remap drive's physical memory address */
|
||||
mem = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (!mem)
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(mem))
|
||||
return PTR_ERR(mem);
|
||||
|
||||
/* request and activate power and reset GPIOs */
|
||||
lda->power = devm_gpiod_get(dev, "power", GPIOD_OUT_HIGH);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue