]> err.no Git - linux-2.6/commitdiff
ata/sata_fsl: Remove unnecessary SCR cases
authorJeff Garzik <jeff@garzik.org>
Wed, 31 Oct 2007 11:27:57 +0000 (19:27 +0800)
committerJeff Garzik <jeff@garzik.org>
Sat, 3 Nov 2007 12:46:28 +0000 (08:46 -0400)
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>
drivers/ata/sata_fsl.c

index 9e99cc88340f5f69a6ffdaa12f98bed21f845900..e04fb75e58fb2779e1e189eaf5ebb7cc285f8366 100644 (file)
@@ -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;
@@ -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;