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>
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;
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;