aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ieee802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-04-24 13:09:17 -0400
committerDavid S. Miller <davem@davemloft.net>2014-04-26 12:20:34 -0400
commit1cc9fc53b3e6f323c4194157fcc606e30f2a0b6e (patch)
tree3ef70706a80833a8a1761898d3560bc70b8a4e43 /drivers/net/ieee802154
parent57e48ffce90aa6105f2fe032336b6d7e86bec5af (diff)
at86rf230: remove unnecessary state read
This patch removes a unnecessary state read. The status value is never evaluate after reading the state. Also rename the status variable to dvdd, because this variable will be used later. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r--drivers/net/ieee802154/at86rf230.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 67c01bf1421e..1331152561f9 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -969,13 +969,9 @@ static int at86rf230_irq_polarity(struct at86rf230_local *lp, int pol)
969static int at86rf230_hw_init(struct at86rf230_local *lp) 969static int at86rf230_hw_init(struct at86rf230_local *lp)
970{ 970{
971 int rc, irq_pol, irq_type; 971 int rc, irq_pol, irq_type;
972 u8 status; 972 u8 dvdd;
973 u8 csma_seed[2]; 973 u8 csma_seed[2];
974 974
975 rc = at86rf230_read_subreg(lp, SR_TRX_STATUS, &status);
976 if (rc)
977 return rc;
978
979 rc = at86rf230_write_subreg(lp, SR_TRX_CMD, STATE_FORCE_TRX_OFF); 975 rc = at86rf230_write_subreg(lp, SR_TRX_CMD, STATE_FORCE_TRX_OFF);
980 if (rc) 976 if (rc)
981 return rc; 977 return rc;
@@ -1015,10 +1011,10 @@ static int at86rf230_hw_init(struct at86rf230_local *lp)
1015 /* Wait the next SLEEP cycle */ 1011 /* Wait the next SLEEP cycle */
1016 msleep(100); 1012 msleep(100);
1017 1013
1018 rc = at86rf230_read_subreg(lp, SR_DVDD_OK, &status); 1014 rc = at86rf230_read_subreg(lp, SR_DVDD_OK, &dvdd);
1019 if (rc) 1015 if (rc)
1020 return rc; 1016 return rc;
1021 if (!status) { 1017 if (!dvdd) {
1022 dev_err(&lp->spi->dev, "DVDD error\n"); 1018 dev_err(&lp->spi->dev, "DVDD error\n");
1023 return -EINVAL; 1019 return -EINVAL;
1024 } 1020 }