提交 9465d532 编写于 作者: J Jeff Garzik

ata/sata_fsl: Remove unnecessary SCR cases

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: NJeff Garzik <jeff@garzik.org>
Signed-off-by: NLi Yang <leoli@freescale.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 a2962dd0
...@@ -472,16 +472,10 @@ static int sata_fsl_scr_write(struct ata_port *ap, unsigned int sc_reg_in, ...@@ -472,16 +472,10 @@ static int sata_fsl_scr_write(struct ata_port *ap, unsigned int sc_reg_in,
switch (sc_reg_in) { switch (sc_reg_in) {
case SCR_STATUS: case SCR_STATUS:
sc_reg = 0;
break;
case SCR_ERROR: case SCR_ERROR:
sc_reg = 1;
break;
case SCR_CONTROL: case SCR_CONTROL:
sc_reg = 2;
break;
case SCR_ACTIVE: case SCR_ACTIVE:
sc_reg = 3; sc_reg = sc_reg_in;
break; break;
default: default:
return -EINVAL; return -EINVAL;
...@@ -502,16 +496,10 @@ static int sata_fsl_scr_read(struct ata_port *ap, unsigned int sc_reg_in, ...@@ -502,16 +496,10 @@ static int sata_fsl_scr_read(struct ata_port *ap, unsigned int sc_reg_in,
switch (sc_reg_in) { switch (sc_reg_in) {
case SCR_STATUS: case SCR_STATUS:
sc_reg = 0;
break;
case SCR_ERROR: case SCR_ERROR:
sc_reg = 1;
break;
case SCR_CONTROL: case SCR_CONTROL:
sc_reg = 2;
break;
case SCR_ACTIVE: case SCR_ACTIVE:
sc_reg = 3; sc_reg = sc_reg_in;
break; break;
default: default:
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册