From 2ad18d1d785fdc46b9b778c20c64a48c33b7c0ba Mon Sep 17 00:00:00 2001 From: Sean Young Date: Sun, 25 Nov 2018 12:59:48 -0500 Subject: 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/saa7134/saa7134-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/media/pci/saa7134/saa7134-core.c') 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); -- cgit v1.2.3