From 7598968d6fdbe8960b941246cc6ebef725899c59 Mon Sep 17 00:00:00 2001
From: Andrey Yurovsky <andrey@snupi.com>
Date: Wed, 17 Dec 2014 13:14:42 -0800
Subject: [PATCH] at86rf230: fix register read for part version

The driver was reading the PART_NUM register for both the part number
(type of device) and the part version, the version is actually in
register 0x1D, VERSION_NUM.  I believe that this was a copy-paste error.

Tested on AT86RF212B where the part is detected to be the expected part
number (0x07) and version (0x03 on mine).

Signed-off-by: Andrey Yurovsky <andrey@snupi.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 drivers/net/ieee802154/at86rf230.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 2ebaba34e408..b37c0249080d 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -1421,7 +1421,7 @@ at86rf230_detect_device(struct at86rf230_local *lp)
 	if (rc)
 		return rc;
 
-	rc = __at86rf230_read(lp, RG_PART_NUM, &version);
+	rc = __at86rf230_read(lp, RG_VERSION_NUM, &version);
 	if (rc)
 		return rc;
 
-- 
2.20.1