Commit ac6e4c15 authored by Sasha Levin's avatar Sasha Levin Committed by Mauro Carvalho Chehab

[media] USB: Staging: media: lirc: initialize spinlocks before usage

Initialize the spinlock for each hardware time.
Signed-off-by: default avatarSasha Levin <levinsasha928@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 70c276a6
...@@ -129,6 +129,7 @@ static void send_space_homebrew(long length); ...@@ -129,6 +129,7 @@ static void send_space_homebrew(long length);
static struct lirc_serial hardware[] = { static struct lirc_serial hardware[] = {
[LIRC_HOMEBREW] = { [LIRC_HOMEBREW] = {
.lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_HOMEBREW].lock),
.signal_pin = UART_MSR_DCD, .signal_pin = UART_MSR_DCD,
.signal_pin_change = UART_MSR_DDCD, .signal_pin_change = UART_MSR_DDCD,
.on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR),
...@@ -145,6 +146,7 @@ static struct lirc_serial hardware[] = { ...@@ -145,6 +146,7 @@ static struct lirc_serial hardware[] = {
}, },
[LIRC_IRDEO] = { [LIRC_IRDEO] = {
.lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IRDEO].lock),
.signal_pin = UART_MSR_DSR, .signal_pin = UART_MSR_DSR,
.signal_pin_change = UART_MSR_DDSR, .signal_pin_change = UART_MSR_DDSR,
.on = UART_MCR_OUT2, .on = UART_MCR_OUT2,
...@@ -156,6 +158,7 @@ static struct lirc_serial hardware[] = { ...@@ -156,6 +158,7 @@ static struct lirc_serial hardware[] = {
}, },
[LIRC_IRDEO_REMOTE] = { [LIRC_IRDEO_REMOTE] = {
.lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IRDEO_REMOTE].lock),
.signal_pin = UART_MSR_DSR, .signal_pin = UART_MSR_DSR,
.signal_pin_change = UART_MSR_DDSR, .signal_pin_change = UART_MSR_DDSR,
.on = (UART_MCR_RTS | UART_MCR_DTR | UART_MCR_OUT2), .on = (UART_MCR_RTS | UART_MCR_DTR | UART_MCR_OUT2),
...@@ -167,6 +170,7 @@ static struct lirc_serial hardware[] = { ...@@ -167,6 +170,7 @@ static struct lirc_serial hardware[] = {
}, },
[LIRC_ANIMAX] = { [LIRC_ANIMAX] = {
.lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_ANIMAX].lock),
.signal_pin = UART_MSR_DCD, .signal_pin = UART_MSR_DCD,
.signal_pin_change = UART_MSR_DDCD, .signal_pin_change = UART_MSR_DDCD,
.on = 0, .on = 0,
...@@ -177,6 +181,7 @@ static struct lirc_serial hardware[] = { ...@@ -177,6 +181,7 @@ static struct lirc_serial hardware[] = {
}, },
[LIRC_IGOR] = { [LIRC_IGOR] = {
.lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_IGOR].lock),
.signal_pin = UART_MSR_DSR, .signal_pin = UART_MSR_DSR,
.signal_pin_change = UART_MSR_DDSR, .signal_pin_change = UART_MSR_DDSR,
.on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR),
...@@ -201,6 +206,7 @@ static struct lirc_serial hardware[] = { ...@@ -201,6 +206,7 @@ static struct lirc_serial hardware[] = {
* See also http://www.nslu2-linux.org for this device * See also http://www.nslu2-linux.org for this device
*/ */
[LIRC_NSLU2] = { [LIRC_NSLU2] = {
.lock = __SPIN_LOCK_UNLOCKED(hardware[LIRC_NSLU2].lock),
.signal_pin = UART_MSR_CTS, .signal_pin = UART_MSR_CTS,
.signal_pin_change = UART_MSR_DCTS, .signal_pin_change = UART_MSR_DCTS,
.on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR),
......
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