summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8187se
diff options
context:
space:
mode:
authorPeter Huewe <peterhuewe@gmx.de>2013-02-13 04:05:23 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-15 10:28:37 -0800
commitaa341b6afab172b626f37b4ce6eff6d7485e400f (patch)
tree1033daf51bd08f395606d92089310af6bb5428e7 /drivers/staging/rtl8187se
parent2c370d9512c4ea0929e87cb18a2308d9422a350a (diff)
downloadlinux-aa341b6afab172b626f37b4ce6eff6d7485e400f.tar.bz2
staging/rtl8187se: Remove temporary variable for return value
The simple PlatformIORead1Byte function doesn't need to store its return value in a temporary variable; rather simply return the value directly. By moving the function to the top we can also get rid of the forward declaration. The wrapper functions could be easily replaced by direct calls to read_nic_byte but is kept for readability. Since this functions is local only we can mark it as static. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8187se')
-rw-r--r--drivers/staging/rtl8187se/r8185b_init.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/staging/rtl8187se/r8185b_init.c b/drivers/staging/rtl8187se/r8185b_init.c
index a3b836cf775b..1dfa78e137c0 100644
--- a/drivers/staging/rtl8187se/r8185b_init.c
+++ b/drivers/staging/rtl8187se/r8185b_init.c
@@ -115,6 +115,11 @@ static u8 OFDM_CONFIG[] = {
*---------------------------------------------------------------
*/
+static u8 PlatformIORead1Byte(struct net_device *dev, u32 offset)
+{
+ return read_nic_byte(dev, offset);
+}
+
void PlatformIOWrite1Byte(struct net_device *dev, u32 offset, u8 data)
{
write_nic_byte(dev, offset, data);
@@ -127,8 +132,6 @@ void PlatformIOWrite2Byte(struct net_device *dev, u32 offset, u16 data)
read_nic_word(dev, offset); /* To make sure write operation is completed, 2005.11.09, by rcnjko. */
}
-u8 PlatformIORead1Byte(struct net_device *dev, u32 offset);
-
void PlatformIOWrite4Byte(struct net_device *dev, u32 offset, u32 data)
{
if (offset == PhyAddr) {
@@ -172,16 +175,6 @@ void PlatformIOWrite4Byte(struct net_device *dev, u32 offset, u32 data)
}
}
-u8 PlatformIORead1Byte(struct net_device *dev, u32 offset)
-{
- u8 data = 0;
-
- data = read_nic_byte(dev, offset);
-
-
- return data;
-}
-
u16 PlatformIORead2Byte(struct net_device *dev, u32 offset)
{
u16 data = 0;