Skip to content

Commit

Permalink
media: rc: nuvoton: Tweak the interrupt enabling dance
Browse files Browse the repository at this point in the history
It appears that we need to enable CIR device before attempting to touch
some of the registers. Previously, this was not a big issue, since we
were rarely seeing nvt_close() getting called.

Unfortunately, since commit cb84343 ("media: lirc: do not call close()
or open() on unregistered devices") the initial open() during probe from
rc_setup_rx_device() is no longer successful, which means that userspace
clients will actually end up calling nvt_open()/nvt_close(). Since
nvt_open() is broken, the device doesn't seem to work as expected.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199597

Signed-off-by: Michał Winiarski <[email protected]>
Cc: Jarod Wilson <[email protected]>
Signed-off-by: Sean Young <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
mwiniars authored and mchehab committed May 28, 2018
1 parent f620d1d commit 70c30b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/rc/nuvoton-cir.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,9 @@ static int nvt_open(struct rc_dev *dev)
struct nvt_dev *nvt = dev->priv;
unsigned long flags;

/* enable the CIR logical device */
nvt_enable_logical_dev(nvt, LOGICAL_DEV_CIR);

spin_lock_irqsave(&nvt->lock, flags);

/* set function enable flags */
Expand All @@ -937,9 +940,6 @@ static int nvt_open(struct rc_dev *dev)

spin_unlock_irqrestore(&nvt->lock, flags);

/* enable the CIR logical device */
nvt_enable_logical_dev(nvt, LOGICAL_DEV_CIR);

return 0;
}

Expand Down

0 comments on commit 70c30b1

Please sign in to comment.