parport: remove unused dead code from lowlevel drivers
PATCH 1/1 parport: remove unused dead code from lowlevel drivers
This unused code has been untouched for over 7 years and must go.
Signed-off-by Matt Porter <[email protected]>
--- drivers/parport/parport_amiga.c | 36 ----- drivers/parport/parport_atari.c | 9 -- drivers/parport/parport_mfc3.c | 35 ----- drivers/parport/parport_pc.c | 276 -------------------------------------- drivers/parport/parport_sunbpp.c | 21 --- 5 files changed, 0 insertions(+), 377 deletions(-)
drivers/parport/parport_amiga.c +0 -36
@@ -48,23 +48,6 @@ static unsigned char amiga_read_data(struct parport *p)return ciaa.prb; } -#if 0 -static unsigned char control_pc_to_amiga (unsigned char control) -{ -unsigned char ret =0 ; - -if (control &PARPORT_CONTROL_SELECT )/* XXX: What is SELECP? */ - ; -if (control &PARPORT_CONTROL_INIT )/* INITP */ -/* reset connected to cpu reset pin */ ; -if (control &PARPORT_CONTROL_AUTOFD )/* AUTOLF */ -/* Not connected */ ; -if (control &PARPORT_CONTROL_STROBE )/* Strobe */ -/* Handled only directly by hardware */ ; -return ret; -} -#endif -static unsigned char control_amiga_to_pc (unsigned char control) { return PARPORT_CONTROL_SELECT |
@@ -95,25 +78,6 @@ static unsigned char amiga_frob_control( struct parport *p, unsigned char mask,return old; } -#if 0 /* currently unused */ -static unsigned char status_pc_to_amiga (unsigned char status) -{ -unsigned char ret =1 ; - -if (status &PARPORT_STATUS_BUSY )/* Busy */ - ret &= ~1 ; -if (status &PARPORT_STATUS_ACK )/* Ack */ -/* handled in hardware */ ; -if (status &PARPORT_STATUS_PAPEROUT )/* PaperOut */ - ret |=2 ; -if (status &PARPORT_STATUS_SELECT )/* select */ - ret |=4 ; -if (status &PARPORT_STATUS_ERROR )/* error */ -/* not connected */ ; -return ret; -} -#endif -static unsigned char status_amiga_to_pc (unsigned char status) {unsigned char ret =PARPORT_STATUS_BUSY |PARPORT_STATUS_ACK |PARPORT_STATUS_ERROR ;
drivers/parport/parport_atari.c +0 -9
@@ -130,15 +130,6 @@ parport_atari_data_forward(struct parport *p)static void parport_atari_data_reverse (struct parport *p) { -#if 0 /* too dangerous, can kill sound chip */ -unsigned long flags; - -local_irq_save (flags); -/* Soundchip port B as input. */ - sound_ym.rd_data_reg_sel =7 ; - sound_ym.wd_data = sound_ym.rd_data_reg_sel & ~0x40 ; -local_irq_restore (flags); -#endif }static struct parport_operations parport_atari_ops = {
drivers/parport/parport_mfc3.c +0 -35
@@ -147,25 +147,6 @@ DPRINTK(KERN_DEBUG "frob_control mask %02x, value %02x\n",mask,val);return old; } -#if 0 /* currently unused */ -static unsigned char status_pc_to_mfc3 (unsigned char status) -{ -unsigned char ret =1 ; - -if (status &PARPORT_STATUS_BUSY )/* Busy */ - ret &= ~1 ; -if (status &PARPORT_STATUS_ACK )/* Ack */ - ret |=8 ; -if (status &PARPORT_STATUS_PAPEROUT )/* PaperOut */ - ret |=2 ; -if (status &PARPORT_STATUS_SELECT )/* select */ - ret |=4 ; -if (status &PARPORT_STATUS_ERROR )/* error */ - ret |=16 ; -return ret; -} -#endif -static unsigned char status_mfc3_to_pc (unsigned char status) {unsigned char ret =PARPORT_STATUS_BUSY ;
@@ -184,14 +165,6 @@ static unsigned char status_mfc3_to_pc(unsigned char status)return ret; } -#if 0 /* currently unused */ -static void mfc3_write_status (struct parport *p,unsigned char status) -{ -DPRINTK (KERN_DEBUG "write_status %02x\n" ,status); -pia (p)->ppra = (pia (p)->ppra &0xe0 ) |status_pc_to_mfc3 (status); -} -#endif -static unsigned char mfc3_read_status (struct parport *p) {unsigned char status;
@@ -201,14 +174,6 @@ DPRINTK(KERN_DEBUG "read_status %02x\n", status);return status; } -#if 0 /* currently unused */ -static void mfc3_change_mode (struct parport *p,int m) -{ -/* XXX: This port only has one mode, and I am -not sure about the corresponding PC-style mode*/ -} -#endif -static int use_cnt =0 ;static irqreturn_t mfc3_interrupt (int irq,void *dev_id)
drivers/parport/parport_pc.c +0 -276
288 lines not on this page · raw message
drivers/parport/parport_sunbpp.c +0 -21
@@ -82,27 +82,6 @@ static unsigned char parport_sunbpp_read_data(struct parport *p)return sbus_readb (®s->p_dr); } -#if 0 -static void control_pc_to_sunbpp (struct parport *p,unsigned char status) -{ -struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base; -unsigned char value_tcr =sbus_readb (®s->p_tcr); -unsigned char value_or =sbus_readb (®s->p_or); - -if (status &PARPORT_CONTROL_STROBE ) - value_tcr |=P_TCR_DS ; -if (status &PARPORT_CONTROL_AUTOFD ) - value_or |=P_OR_AFXN ; -if (status &PARPORT_CONTROL_INIT ) - value_or |=P_OR_INIT ; -if (status &PARPORT_CONTROL_SELECT ) - value_or |=P_OR_SLCT_IN ; - -sbus_writeb (value_or, ®s->p_or); -sbus_writeb (value_tcr, ®s->p_tcr); -} -#endif -static unsigned char status_sunbpp_to_pc (struct parport *p) {struct bpp_regs __iomem *regs = (struct bpp_regs __iomem *)p->base;
Signature · 1 line
1.7.5.4