aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSasha Levin <levinsasha928@gmail.com>2012-05-26 14:25:26 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-06-18 10:15:04 -0400
commitac6e4c1560f8d3d18e6ba265d84ff03810496f4f (patch)
tree241f30985b46e929535d966f455285ecb07ff7d7 /drivers
parent70c276a6abdb1a466a9026da631c396fee2984bd (diff)
[media] USB: Staging: media: lirc: initialize spinlocks before usage
Initialize the spinlock for each hardware time. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/media/lirc/lirc_serial.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/media/lirc/lirc_serial.c b/drivers/staging/media/lirc/lirc_serial.c
index 3295ea63f3eb..97ef67036e3f 100644
--- a/drivers/staging/media/lirc/lirc_serial.c
+++ b/drivers/staging/media/lirc/lirc_serial.c
@@ -129,6 +129,7 @@ static void send_space_homebrew(long length);
129 129
130static struct lirc_serial hardware[] = { 130static struct lirc_serial hardware[] = {
131 [LIRC_HOMEBREW] = { 131 [LIRC_HOMEBREW] = {
132 .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_HOMEBREW].lock),
132 .signal_pin = UART_MSR_DCD, 133 .signal_pin = UART_MSR_DCD,
133 .signal_pin_change = UART_MSR_DDCD, 134 .signal_pin_change = UART_MSR_DDCD,
134 .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), 135 .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR),
@@ -145,6 +146,7 @@ static struct lirc_serial hardware[] = {
145 }, 146 },
146 147
147 [LIRC_IRDEO] = { 148 [LIRC_IRDEO] = {
149 .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IRDEO].lock),
148 .signal_pin = UART_MSR_DSR, 150 .signal_pin = UART_MSR_DSR,
149 .signal_pin_change = UART_MSR_DDSR, 151 .signal_pin_change = UART_MSR_DDSR,
150 .on = UART_MCR_OUT2, 152 .on = UART_MCR_OUT2,
@@ -156,6 +158,7 @@ static struct lirc_serial hardware[] = {
156 }, 158 },
157 159
158 [LIRC_IRDEO_REMOTE] = { 160 [LIRC_IRDEO_REMOTE] = {
161 .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IRDEO_REMOTE].lock),
159 .signal_pin = UART_MSR_DSR, 162 .signal_pin = UART_MSR_DSR,
160 .signal_pin_change = UART_MSR_DDSR, 163 .signal_pin_change = UART_MSR_DDSR,
161 .on = (UART_MCR_RTS | UART_MCR_DTR | UART_MCR_OUT2), 164 .on = (UART_MCR_RTS | UART_MCR_DTR | UART_MCR_OUT2),
@@ -167,6 +170,7 @@ static struct lirc_serial hardware[] = {
167 }, 170 },
168 171
169 [LIRC_ANIMAX] = { 172 [LIRC_ANIMAX] = {
173 .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_ANIMAX].lock),
170 .signal_pin = UART_MSR_DCD, 174 .signal_pin = UART_MSR_DCD,
171 .signal_pin_change = UART_MSR_DDCD, 175 .signal_pin_change = UART_MSR_DDCD,
172 .on = 0, 176 .on = 0,
@@ -177,6 +181,7 @@ static struct lirc_serial hardware[] = {
177 }, 181 },
178 182
179 [LIRC_IGOR] = { 183 [LIRC_IGOR] = {
184 .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IGOR].lock),
180 .signal_pin = UART_MSR_DSR, 185 .signal_pin = UART_MSR_DSR,
181 .signal_pin_change = UART_MSR_DDSR, 186 .signal_pin_change = UART_MSR_DDSR,
182 .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), 187 .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR),
@@ -201,6 +206,7 @@ static struct lirc_serial hardware[] = {
201 * See also http://www.nslu2-linux.org for this device 206 * See also http://www.nslu2-linux.org for this device
202 */ 207 */
203 [LIRC_NSLU2] = { 208 [LIRC_NSLU2] = {
209 .lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_NSLU2].lock),
204 .signal_pin = UART_MSR_CTS, 210 .signal_pin = UART_MSR_CTS,
205 .signal_pin_change = UART_MSR_DCTS, 211 .signal_pin_change = UART_MSR_DCTS,
206 .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), 212 .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR),