diff options
author | Sean Young <sean@mess.org> | 2018-11-25 12:59:48 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-12-03 13:22:46 -0500 |
commit | 2ad18d1d785fdc46b9b778c20c64a48c33b7c0ba (patch) | |
tree | f396b5a25eb338162989bfe8f208f3d77bb77d70 /drivers/media/pci/saa7134/saa7134-core.c | |
parent | 87e25f4b2c3c85804502c7f2364f396e59f0ff2d (diff) |
media: saa7134: rc-core maintains users count, no need to duplicate
This simplifies the code a little. Tested with suspend and resume.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/pci/saa7134/saa7134-core.c')
-rw-r--r-- | drivers/media/pci/saa7134/saa7134-core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-core.c b/drivers/media/pci/saa7134/saa7134-core.c index 8984b1bf57a5..aa98ea49558c 100644 --- a/drivers/media/pci/saa7134/saa7134-core.c +++ b/drivers/media/pci/saa7134/saa7134-core.c @@ -1419,8 +1419,8 @@ static int saa7134_suspend(struct pci_dev *pci_dev , pm_message_t state) del_timer(&dev->vbi_q.timeout); del_timer(&dev->ts_q.timeout); - if (dev->remote) - saa7134_ir_stop(dev); + if (dev->remote && dev->remote->dev->users) + saa7134_ir_close(dev->remote->dev); pci_save_state(pci_dev); pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state)); @@ -1447,8 +1447,8 @@ static int saa7134_resume(struct pci_dev *pci_dev) saa7134_videoport_init(dev); if (card_has_mpeg(dev)) saa7134_ts_init_hw(dev); - if (dev->remote) - saa7134_ir_start(dev); + if (dev->remote && dev->remote->dev->users) + saa7134_ir_open(dev->remote->dev); saa7134_hw_enable1(dev); msleep(100); |