diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-05-17 16:46:55 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-05-24 16:45:33 +0300 |
commit | aea8baa10ac5e9acddf80e48593fe85c22d19286 (patch) | |
tree | 6696ea56a254f61e211a5dbeb3746268dc30b91c /drivers/net/wireless/ralink/rt2x00/rt2x00.h | |
parent | 16d571bb0fe6aa7fed82e19166ca1542026c9c06 (diff) | |
download | linux-aea8baa10ac5e9acddf80e48593fe85c22d19286.tar.gz |
rt2x00: convert rt2x00_rf_read return type
This is a semi-automated conversion to change rt2x00_rf_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_rf_read\>(.*, .*\), &\(.*\));:\2 = \1);:' \
drivers/net/wireless/ralink/rt2x00/rt*
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.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h index f2ae33bf2ef2..36791f7ae2ce 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h @@ -1049,15 +1049,8 @@ struct rt2x00_bar_list_entry { * Generic RF access. * The RF is being accessed by word index. */ -static inline void rt2x00_rf_read(struct rt2x00_dev *rt2x00dev, - const unsigned int word, u32 *data) -{ - BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); - *data = rt2x00dev->rf[word - 1]; -} - -static inline u32 _rt2x00_rf_read(struct rt2x00_dev *rt2x00dev, - const unsigned int word) +static inline u32 rt2x00_rf_read(struct rt2x00_dev *rt2x00dev, + const unsigned int word) { BUG_ON(word < 1 || word > rt2x00dev->ops->rf_size / sizeof(u32)); return rt2x00dev->rf[word - 1]; |