summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rsi/rsi_91x_usb.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <amit.karwar@redpinesignals.com>2017-07-11 17:27:51 +0300
committerKalle Valo <kvalo@codeaurora.org>2017-07-28 17:27:18 +0300
commit523b724a769b69963ef46efa14b8b730b40419d5 (patch)
tree21fa765a364c3ee2dbd185ff61a5c701557de2e3 /drivers/net/wireless/rsi/rsi_91x_usb.c
parentd7203a83f065dc78d907c2a2f5d317972ec28d52 (diff)
downloadlinux-523b724a769b69963ef46efa14b8b730b40419d5.tar.xz
rsi: use macro for allocating USB buffer
4 bytes is fixed size for reading or writing USB register. We will use a macro instead of hardcoding this. Fixes: b97e9b94ad75c ("rsi: Add new host interface operations") Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/rsi/rsi_91x_usb.c')
-rw-r--r--drivers/net/wireless/rsi/rsi_91x_usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c
index 3febf24d619b..99a520afc7c5 100644
--- a/drivers/net/wireless/rsi/rsi_91x_usb.c
+++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
@@ -162,7 +162,7 @@ static int rsi_usb_reg_read(struct usb_device *usbdev,
u8 *buf;
int status = -ENOMEM;
- buf = kmalloc(0x04, GFP_KERNEL);
+ buf = kmalloc(RSI_USB_CTRL_BUF_SIZE, GFP_KERNEL);
if (!buf)
return status;
@@ -204,7 +204,7 @@ static int rsi_usb_reg_write(struct usb_device *usbdev,
u8 *usb_reg_buf;
int status = -ENOMEM;
- usb_reg_buf = kmalloc(0x04, GFP_KERNEL);
+ usb_reg_buf = kmalloc(RSI_USB_CTRL_BUF_SIZE, GFP_KERNEL);
if (!usb_reg_buf)
return status;