@@ -35,6 +35,16 @@ static void bpck6_write_regr(struct pi_adapter *pi, int cont, int reg, int val)
ppc6_wr_data_byte(pi, val);
}
+static void bpck6_wait_for_fifo(struct pi_adapter *pi)
+{
+ int i;
+
+ if (pi->private & fifo_wait) {
+ for (i = 0; i < 20; i++)
+ parport_read_status(pi->pardev->port);
+ }
+}
+
static void bpck6_write_block(struct pi_adapter *pi, char *buf, int len)
{
u8 this, last;
@@ -87,17 +97,17 @@ static void bpck6_write_block(struct pi_adapter *pi, char *buf, int len)
case PPCMODE_EPP_BYTE:
pi->pardev->port->ops->epp_write_data(pi->pardev->port, buf,
len, PARPORT_EPP_FAST_8);
- ppc6_wait_for_fifo(pi);
+ bpck6_wait_for_fifo(pi);
break;
case PPCMODE_EPP_WORD:
pi->pardev->port->ops->epp_write_data(pi->pardev->port, buf,
len, PARPORT_EPP_FAST_16);
- ppc6_wait_for_fifo(pi);
+ bpck6_wait_for_fifo(pi);
break;
case PPCMODE_EPP_DWORD:
pi->pardev->port->ops->epp_write_data(pi->pardev->port, buf,
len, PARPORT_EPP_FAST_32);
- ppc6_wait_for_fifo(pi);
+ bpck6_wait_for_fifo(pi);
break;
}
@@ -72,7 +72,6 @@ static void ppc6_deselect(struct pi_adapter *pi);
static void ppc6_send_cmd(struct pi_adapter *pi, u8 cmd);
static void ppc6_wr_data_byte(struct pi_adapter *pi, u8 data);
static u8 ppc6_rd_data_byte(struct pi_adapter *pi);
-static void ppc6_wait_for_fifo(struct pi_adapter *pi);
static void ppc6_wr_extout(struct pi_adapter *pi, u8 regdata);
static int ppc6_open(struct pi_adapter *pi);
@@ -282,19 +281,6 @@ static u8 ppc6_rd_data_byte(struct pi_adapter *pi)
//***************************************************************************
-static void ppc6_wait_for_fifo(struct pi_adapter *pi)
-{
- int i;
-
- if (pi->private & fifo_wait)
- {
- for(i=0; i<20; i++)
- parport_read_status(pi->pardev->port);
- }
-}
-
-//***************************************************************************
-
static void ppc6_wr_extout(struct pi_adapter *pi, u8 regdata)
{
ppc6_send_cmd(pi, REG_VERSION | ACCESS_REG | ACCESS_WRITE);
Move ppc6_wait_for_fifo to bpck6.c and rename it to bpck6_wait_for_fifo Signed-off-by: Ondrej Zary <linux@zary.sk> --- drivers/ata/pata_parport/bpck6.c | 16 +++++++++++++--- drivers/ata/pata_parport/ppc6lnx.c | 14 -------------- 2 files changed, 13 insertions(+), 17 deletions(-)