aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2012-08-06 21:47:05 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-09 19:40:20 -0400
commit8ff63de690d74bec848caab64a86bd53c797365c (patch)
treee443f2cb5862163f28aea1ec40bac684be928d80
parentfaaf01b2f6be0378c0c6084f0257b150dc014152 (diff)
[media] au0828: remove control buffer from send_control_msg
There are no cases where a control message is ever sent to the au0828 with an actual buffer defined. Remove the reference to dev->ctrlmsg, which currently requires us to hold a mutex since it is shared with the read function. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/au0828/au0828-core.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c
index b2c4254e6ec3..65914bc421d0 100644
--- a/drivers/media/video/au0828/au0828-core.c
+++ b/drivers/media/video/au0828/au0828-core.c
@@ -46,7 +46,7 @@ MODULE_PARM_DESC(disable_usb_speed_check,
46#define _BULKPIPESIZE 0xffff 46#define _BULKPIPESIZE 0xffff
47 47
48static int send_control_msg(struct au0828_dev *dev, u16 request, u32 value, 48static int send_control_msg(struct au0828_dev *dev, u16 request, u32 value,
49 u16 index, unsigned char *cp, u16 size); 49 u16 index);
50static int recv_control_msg(struct au0828_dev *dev, u16 request, u32 value, 50static int recv_control_msg(struct au0828_dev *dev, u16 request, u32 value,
51 u16 index, unsigned char *cp, u16 size); 51 u16 index, unsigned char *cp, u16 size);
52 52
@@ -64,8 +64,7 @@ u32 au0828_readreg(struct au0828_dev *dev, u16 reg)
64u32 au0828_writereg(struct au0828_dev *dev, u16 reg, u32 val) 64u32 au0828_writereg(struct au0828_dev *dev, u16 reg, u32 val)
65{ 65{
66 dprintk(8, "%s(0x%04x, 0x%02x)\n", __func__, reg, val); 66 dprintk(8, "%s(0x%04x, 0x%02x)\n", __func__, reg, val);
67 return send_control_msg(dev, CMD_REQUEST_OUT, val, reg, 67 return send_control_msg(dev, CMD_REQUEST_OUT, val, reg);
68 dev->ctrlmsg, 0);
69} 68}
70 69
71static void cmd_msg_dump(struct au0828_dev *dev) 70static void cmd_msg_dump(struct au0828_dev *dev)
@@ -87,10 +86,10 @@ static void cmd_msg_dump(struct au0828_dev *dev)
87} 86}
88 87
89static int send_control_msg(struct au0828_dev *dev, u16 request, u32 value, 88static int send_control_msg(struct au0828_dev *dev, u16 request, u32 value,
90 u16 index, unsigned char *cp, u16 size) 89 u16 index)
91{ 90{
92 int status = -ENODEV; 91 int status = -ENODEV;
93 mutex_lock(&dev->mutex); 92
94 if (dev->usbdev) { 93 if (dev->usbdev) {
95 94
96 /* cp must be memory that has been allocated by kmalloc */ 95 /* cp must be memory that has been allocated by kmalloc */
@@ -99,8 +98,7 @@ static int send_control_msg(struct au0828_dev *dev, u16 request, u32 value,
99 request, 98 request,
100 USB_DIR_OUT | USB_TYPE_VENDOR | 99 USB_DIR_OUT | USB_TYPE_VENDOR |
101 USB_RECIP_DEVICE, 100 USB_RECIP_DEVICE,
102 value, index, 101 value, index, NULL, 0, 1000);
103 cp, size, 1000);
104 102
105 status = min(status, 0); 103 status = min(status, 0);
106 104
@@ -110,7 +108,7 @@ static int send_control_msg(struct au0828_dev *dev, u16 request, u32 value,
110 } 108 }
111 109
112 } 110 }
113 mutex_unlock(&dev->mutex); 111
114 return status; 112 return status;
115} 113}
116 114