Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d9c76ae authored by Tejun Heo's avatar Tejun Heo
Browse files

dvb: don't use flush_scheduled_work()



flush_scheduled_work() is deprecated and scheduled to be removed.

* Flush the used works directly.

* Replace the deprecated cancel_rearming_delayed_work() +
  flush_scheduled_work() -> cancel_delayed_work_sync().

* Make sure mantis->uart_work isn't running on exit.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-media@vger.kernel.org
parent 99ef2121
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1329,7 +1329,8 @@ static int dvb_net_remove_if(struct dvb_net *dvbnet, unsigned long num)
		return -EBUSY;
		return -EBUSY;


	dvb_net_stop(net);
	dvb_net_stop(net);
	flush_scheduled_work();
	flush_work_sync(&priv->set_multicast_list_wq);
	flush_work_sync(&priv->restart_net_feed_wq);
	printk("dvb_net: removed network interface %s\n", net->name);
	printk("dvb_net: removed network interface %s\n", net->name);
	unregister_netdev(net);
	unregister_netdev(net);
	dvbnet->state[num]=0;
	dvbnet->state[num]=0;
+0 −1
Original line number Original line Diff line number Diff line
@@ -299,7 +299,6 @@ int dvb_usb_remote_exit(struct dvb_usb_device *d)
{
{
	if (d->state & DVB_USB_STATE_REMOTE) {
	if (d->state & DVB_USB_STATE_REMOTE) {
		cancel_delayed_work_sync(&d->rc_query_work);
		cancel_delayed_work_sync(&d->rc_query_work);
		flush_scheduled_work();
		if (d->props.rc.mode == DVB_RC_LEGACY)
		if (d->props.rc.mode == DVB_RC_LEGACY)
			input_unregister_device(d->rc_input_dev);
			input_unregister_device(d->rc_input_dev);
		else
		else
+1 −1
Original line number Original line Diff line number Diff line
@@ -111,7 +111,7 @@ void mantis_evmgr_exit(struct mantis_ca *ca)
	struct mantis_pci *mantis = ca->ca_priv;
	struct mantis_pci *mantis = ca->ca_priv;


	dprintk(MANTIS_DEBUG, 1, "Mantis Host I/F Event manager exiting");
	dprintk(MANTIS_DEBUG, 1, "Mantis Host I/F Event manager exiting");
	flush_scheduled_work();
	flush_work_sync(&ca->hif_evm_work);
	mantis_hif_exit(ca);
	mantis_hif_exit(ca);
	mantis_pcmcia_exit(ca);
	mantis_pcmcia_exit(ca);
}
}
+1 −0
Original line number Original line Diff line number Diff line
@@ -182,5 +182,6 @@ void mantis_uart_exit(struct mantis_pci *mantis)
{
{
	/* disable interrupt */
	/* disable interrupt */
	mmwrite(mmread(MANTIS_UART_CTL) & 0xffef, MANTIS_UART_CTL);
	mmwrite(mmread(MANTIS_UART_CTL) & 0xffef, MANTIS_UART_CTL);
	flush_work_sync(&mantis->uart_work);
}
}
EXPORT_SYMBOL_GPL(mantis_uart_exit);
EXPORT_SYMBOL_GPL(mantis_uart_exit);