Skip to content

Commit

Permalink
ata/sata_fsl: Remove unnecessary SCR cases
Browse files Browse the repository at this point in the history
SCRs in the driver map to the standard values found in include/linux/ata.h,
so no need for individual scr_read/scr_write case statements duplicating
the natural value.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Jeff Garzik committed Nov 3, 2007
1 parent a2962dd commit 9465d53
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions drivers/ata/sata_fsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,16 +472,10 @@ static int sata_fsl_scr_write(struct ata_port *ap, unsigned int sc_reg_in,

switch (sc_reg_in) {
case SCR_STATUS:
sc_reg = 0;
break;
case SCR_ERROR:
sc_reg = 1;
break;
case SCR_CONTROL:
sc_reg = 2;
break;
case SCR_ACTIVE:
sc_reg = 3;
sc_reg = sc_reg_in;
break;
default:
return -EINVAL;
Expand All @@ -502,16 +496,10 @@ static int sata_fsl_scr_read(struct ata_port *ap, unsigned int sc_reg_in,

switch (sc_reg_in) {
case SCR_STATUS:
sc_reg = 0;
break;
case SCR_ERROR:
sc_reg = 1;
break;
case SCR_CONTROL:
sc_reg = 2;
break;
case SCR_ACTIVE:
sc_reg = 3;
sc_reg = sc_reg_in;
break;
default:
return -EINVAL;
Expand Down

0 comments on commit 9465d53

Please sign in to comment.