summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ralink/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-05-17 17:47:00 +0300
committerKalle Valo <kvalo@codeaurora.org>2017-05-24 16:45:36 +0300
commit38651683aa98399f2e08e7978b8df0a707051887 (patch)
tree554b843cbda095a0fa82a99bdd07205d4aca4b5e /drivers/net/wireless/ralink/rt2x00/rt2x00.h
parent5fbbe378890fd543a9374ec0f86c9cba6d700712 (diff)
downloadlinux-38651683aa98399f2e08e7978b8df0a707051887.tar.xz
rt2x00: convert rt2x00_eeprom_read return type
This is a semi-automated conversion to change rt2x00_eeprom_read() to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\<rt2x00_eeprom_read\>(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:= _\(rt2x00_eeprom_read\):= \1:' drivers/net/wireless/ralink/rt2x00/* Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ralink/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt2x00.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
index 36791f7ae2ce..1f38c338ca7a 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
@@ -1072,14 +1072,8 @@ static inline void *rt2x00_eeprom_addr(struct rt2x00_dev *rt2x00dev,
return (void *)&rt2x00dev->eeprom[word];
}
-static inline void rt2x00_eeprom_read(struct rt2x00_dev *rt2x00dev,
- const unsigned int word, u16 *data)
-{
- *data = le16_to_cpu(rt2x00dev->eeprom[word]);
-}
-
-static inline u16 _rt2x00_eeprom_read(struct rt2x00_dev *rt2x00dev,
- const unsigned int word)
+static inline u16 rt2x00_eeprom_read(struct rt2x00_dev *rt2x00dev,
+ const unsigned int word)
{
return le16_to_cpu(rt2x00dev->eeprom[word]);
}