Commit 2370b876 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Greg Kroah-Hartman

staging: rtl8712: usb_ops.c: Remove leading p from variable names

Remove leading 'p' from the names of the following pointer variables:
- pintfhdl
- pintf_hdl (renamed to intfhdl in keeping with the convention in other
functions)
- poption
- pops
- pintfpriv.
Issue found with Coccinelle.
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3f35d902
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "usb_ops.h" #include "usb_ops.h"
#include "recv_osdep.h" #include "recv_osdep.h"
static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr) static u8 usb_read8(struct intf_hdl *intfhdl, u32 addr)
{ {
u8 request; u8 request;
u8 requesttype; u8 requesttype;
...@@ -30,19 +30,19 @@ static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr) ...@@ -30,19 +30,19 @@ static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr)
u16 index; u16 index;
u16 len; u16 len;
__le32 data; __le32 data;
struct intf_priv *pintfpriv = pintfhdl->pintfpriv; struct intf_priv *intfpriv = intfhdl->pintfpriv;
request = 0x05; request = 0x05;
requesttype = 0x01; /* read_in */ requesttype = 0x01; /* read_in */
index = 0; index = 0;
wvalue = (u16)(addr & 0x0000ffff); wvalue = (u16)(addr & 0x0000ffff);
len = 1; len = 1;
r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, r8712_usbctrl_vendorreq(intfpriv, request, wvalue, index, &data, len,
requesttype); requesttype);
return (u8)(le32_to_cpu(data) & 0x0ff); return (u8)(le32_to_cpu(data) & 0x0ff);
} }
static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr) static u16 usb_read16(struct intf_hdl *intfhdl, u32 addr)
{ {
u8 request; u8 request;
u8 requesttype; u8 requesttype;
...@@ -50,19 +50,19 @@ static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr) ...@@ -50,19 +50,19 @@ static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr)
u16 index; u16 index;
u16 len; u16 len;
__le32 data; __le32 data;
struct intf_priv *pintfpriv = pintfhdl->pintfpriv; struct intf_priv *intfpriv = intfhdl->pintfpriv;
request = 0x05; request = 0x05;
requesttype = 0x01; /* read_in */ requesttype = 0x01; /* read_in */
index = 0; index = 0;
wvalue = (u16)(addr & 0x0000ffff); wvalue = (u16)(addr & 0x0000ffff);
len = 2; len = 2;
r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, r8712_usbctrl_vendorreq(intfpriv, request, wvalue, index, &data, len,
requesttype); requesttype);
return (u16)(le32_to_cpu(data) & 0xffff); return (u16)(le32_to_cpu(data) & 0xffff);
} }
static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr) static u32 usb_read32(struct intf_hdl *intfhdl, u32 addr)
{ {
u8 request; u8 request;
u8 requesttype; u8 requesttype;
...@@ -70,19 +70,19 @@ static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr) ...@@ -70,19 +70,19 @@ static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr)
u16 index; u16 index;
u16 len; u16 len;
__le32 data; __le32 data;
struct intf_priv *pintfpriv = pintfhdl->pintfpriv; struct intf_priv *intfpriv = intfhdl->pintfpriv;
request = 0x05; request = 0x05;
requesttype = 0x01; /* read_in */ requesttype = 0x01; /* read_in */
index = 0; index = 0;
wvalue = (u16)(addr & 0x0000ffff); wvalue = (u16)(addr & 0x0000ffff);
len = 4; len = 4;
r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, r8712_usbctrl_vendorreq(intfpriv, request, wvalue, index, &data, len,
requesttype); requesttype);
return le32_to_cpu(data); return le32_to_cpu(data);
} }
static void usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val) static void usb_write8(struct intf_hdl *intfhdl, u32 addr, u8 val)
{ {
u8 request; u8 request;
u8 requesttype; u8 requesttype;
...@@ -90,7 +90,7 @@ static void usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val) ...@@ -90,7 +90,7 @@ static void usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val)
u16 index; u16 index;
u16 len; u16 len;
__le32 data; __le32 data;
struct intf_priv *pintfpriv = pintfhdl->pintfpriv; struct intf_priv *intfpriv = intfhdl->pintfpriv;
request = 0x05; request = 0x05;
requesttype = 0x00; /* write_out */ requesttype = 0x00; /* write_out */
...@@ -98,11 +98,11 @@ static void usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val) ...@@ -98,11 +98,11 @@ static void usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val)
wvalue = (u16)(addr & 0x0000ffff); wvalue = (u16)(addr & 0x0000ffff);
len = 1; len = 1;
data = cpu_to_le32((u32)val & 0x000000ff); data = cpu_to_le32((u32)val & 0x000000ff);
r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, r8712_usbctrl_vendorreq(intfpriv, request, wvalue, index, &data, len,
requesttype); requesttype);
} }
static void usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val) static void usb_write16(struct intf_hdl *intfhdl, u32 addr, u16 val)
{ {
u8 request; u8 request;
u8 requesttype; u8 requesttype;
...@@ -110,7 +110,7 @@ static void usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val) ...@@ -110,7 +110,7 @@ static void usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val)
u16 index; u16 index;
u16 len; u16 len;
__le32 data; __le32 data;
struct intf_priv *pintfpriv = pintfhdl->pintfpriv; struct intf_priv *intfpriv = intfhdl->pintfpriv;
request = 0x05; request = 0x05;
requesttype = 0x00; /* write_out */ requesttype = 0x00; /* write_out */
...@@ -118,11 +118,11 @@ static void usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val) ...@@ -118,11 +118,11 @@ static void usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val)
wvalue = (u16)(addr & 0x0000ffff); wvalue = (u16)(addr & 0x0000ffff);
len = 2; len = 2;
data = cpu_to_le32((u32)val & 0x0000ffff); data = cpu_to_le32((u32)val & 0x0000ffff);
r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, r8712_usbctrl_vendorreq(intfpriv, request, wvalue, index, &data, len,
requesttype); requesttype);
} }
static void usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val) static void usb_write32(struct intf_hdl *intfhdl, u32 addr, u32 val)
{ {
u8 request; u8 request;
u8 requesttype; u8 requesttype;
...@@ -130,7 +130,7 @@ static void usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val) ...@@ -130,7 +130,7 @@ static void usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val)
u16 index; u16 index;
u16 len; u16 len;
__le32 data; __le32 data;
struct intf_priv *pintfpriv = pintfhdl->pintfpriv; struct intf_priv *intfpriv = intfhdl->pintfpriv;
request = 0x05; request = 0x05;
requesttype = 0x00; /* write_out */ requesttype = 0x00; /* write_out */
...@@ -138,13 +138,13 @@ static void usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val) ...@@ -138,13 +138,13 @@ static void usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val)
wvalue = (u16)(addr & 0x0000ffff); wvalue = (u16)(addr & 0x0000ffff);
len = 4; len = 4;
data = cpu_to_le32(val); data = cpu_to_le32(val);
r8712_usbctrl_vendorreq(pintfpriv, request, wvalue, index, &data, len, r8712_usbctrl_vendorreq(intfpriv, request, wvalue, index, &data, len,
requesttype); requesttype);
} }
void r8712_usb_set_intf_option(u32 *poption) void r8712_usb_set_intf_option(u32 *option)
{ {
*poption = ((*poption) | _INTF_ASYNC_); *option = ((*option) | _INTF_ASYNC_);
} }
static void usb_intf_hdl_init(u8 *priv) static void usb_intf_hdl_init(u8 *priv)
...@@ -163,24 +163,24 @@ static void usb_intf_hdl_close(u8 *priv) ...@@ -163,24 +163,24 @@ static void usb_intf_hdl_close(u8 *priv)
{ {
} }
void r8712_usb_set_intf_funs(struct intf_hdl *pintf_hdl) void r8712_usb_set_intf_funs(struct intf_hdl *intfhdl)
{ {
pintf_hdl->intf_hdl_init = usb_intf_hdl_init; intfhdl->intf_hdl_init = usb_intf_hdl_init;
pintf_hdl->intf_hdl_unload = usb_intf_hdl_unload; intfhdl->intf_hdl_unload = usb_intf_hdl_unload;
pintf_hdl->intf_hdl_open = usb_intf_hdl_open; intfhdl->intf_hdl_open = usb_intf_hdl_open;
pintf_hdl->intf_hdl_close = usb_intf_hdl_close; intfhdl->intf_hdl_close = usb_intf_hdl_close;
} }
void r8712_usb_set_intf_ops(struct _io_ops *pops) void r8712_usb_set_intf_ops(struct _io_ops *ops)
{ {
memset((u8 *)pops, 0, sizeof(struct _io_ops)); memset((u8 *)ops, 0, sizeof(struct _io_ops));
pops->_read8 = usb_read8; ops->_read8 = usb_read8;
pops->_read16 = usb_read16; ops->_read16 = usb_read16;
pops->_read32 = usb_read32; ops->_read32 = usb_read32;
pops->_read_port = r8712_usb_read_port; ops->_read_port = r8712_usb_read_port;
pops->_write8 = usb_write8; ops->_write8 = usb_write8;
pops->_write16 = usb_write16; ops->_write16 = usb_write16;
pops->_write32 = usb_write32; ops->_write32 = usb_write32;
pops->_write_mem = r8712_usb_write_mem; ops->_write_mem = r8712_usb_write_mem;
pops->_write_port = r8712_usb_write_port; ops->_write_port = r8712_usb_write_port;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment