summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorOndrej Zary <linux@zary.sk>2023-03-08 01:46:02 +0300
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2023-03-23 06:21:05 +0300
commitf5031656e4c45951c2f96fb8fda5e0b75b2330f8 (patch)
treeadd24ec397938c691e94eeef55c7fdd9d9931d84 /drivers/ata
parent997b0ce28ad30fd97f3924ddaa88208babf95f05 (diff)
downloadlinux-f5031656e4c45951c2f96fb8fda5e0b75b2330f8.tar.xz
ata: pata_parport-bpck6: remove org_* from struct ppc_storage
org_data duplicates saved_r0 and org_ctrl duplicates saved_r2 in pi->unit. Remove them. Signed-off-by: Ondrej Zary <linux@zary.sk> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_parport/ppc6lnx.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/ata/pata_parport/ppc6lnx.c b/drivers/ata/pata_parport/ppc6lnx.c
index dd9f3040f9a7..7ea8e8a31aeb 100644
--- a/drivers/ata/pata_parport/ppc6lnx.c
+++ b/drivers/ata/pata_parport/ppc6lnx.c
@@ -74,8 +74,6 @@ struct ppc_storage {
// 5 = EPP Word
// 6 = EPP Dword
u8 ppc_flags;
- u8 org_data; // original LPT data port contents
- u8 org_ctrl; // original LPT control port contents
u8 cur_ctrl; // current control port contents
};
@@ -127,17 +125,17 @@ static int ppc6_select(struct pi_adapter *pi)
if (i & 1)
outb(i, pi->port + 1);
- ppc->org_data = inb(pi->port);
+ pi->saved_r0 = inb(pi->port);
- ppc->org_ctrl = inb(pi->port + 2) & 0x5F; // readback ctrl
+ pi->saved_r2 = inb(pi->port + 2) & 0x5F; // readback ctrl
- ppc->cur_ctrl = ppc->org_ctrl;
+ ppc->cur_ctrl = pi->saved_r2;
ppc->cur_ctrl |= port_sel;
outb(ppc->cur_ctrl, pi->port + 2);
- if (ppc->org_data == 'b')
+ if (pi->saved_r0 == 'b')
outb('x', pi->port);
outb('b', pi->port);
@@ -195,9 +193,9 @@ static int ppc6_select(struct pi_adapter *pi)
}
}
- outb(ppc->org_ctrl, pi->port + 2);
+ outb(pi->saved_r2, pi->port + 2);
- outb(ppc->org_data, pi->port);
+ outb(pi->saved_r0, pi->port);
return(0); // FAIL
}
@@ -214,11 +212,11 @@ static void ppc6_deselect(struct pi_adapter *pi)
outb(ppc->cur_ctrl, pi->port + 2);
- outb(ppc->org_data, pi->port);
+ outb(pi->saved_r0, pi->port);
- outb((ppc->org_ctrl | port_sel), pi->port + 2);
+ outb((pi->saved_r2 | port_sel), pi->port + 2);
- outb(ppc->org_ctrl, pi->port + 2);
+ outb(pi->saved_r2, pi->port + 2);
}
//***************************************************************************