From patchwork Wed May 21 18:19:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 4218361 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 40A8F9F1CD for ; Wed, 21 May 2014 18:20:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 705AC201FE for ; Wed, 21 May 2014 18:20:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 641DC2011E for ; Wed, 21 May 2014 18:20:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752994AbaEUSU2 (ORCPT ); Wed, 21 May 2014 14:20:28 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:35964 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752604AbaEUSUP (ORCPT ); Wed, 21 May 2014 14:20:15 -0400 Received: from [201.74.152.26] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1WnB7a-0000f2-Hy; Wed, 21 May 2014 18:20:10 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.80.1) (envelope-from ) id 1WnB7W-0000Tq-4z; Wed, 21 May 2014 15:20:06 -0300 From: Mauro Carvalho Chehab Cc: Devin Heitmueller , Changbing Xiong , Trevor G , "Reynaldo H. Verdejo Pinochet" , Linux Media Mailing List , Mauro Carvalho Chehab , Mauro Carvalho Chehab Subject: [PATCH 1/8] [media] au0828: Cancel stream-restart operation if frontend is disconnected Date: Wed, 21 May 2014 15:19:55 -0300 Message-Id: <1400696402-1805-2-git-send-email-m.chehab@samsung.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1400696402-1805-1-git-send-email-m.chehab@samsung.com> References: <1400696402-1805-1-git-send-email-m.chehab@samsung.com> To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Changbing Xiong X-Patchwork-Delegate: mchehab@redhat.com If the tuner is already disconnected, It is meaningless to go on doing the stream-restart operation, It is better to cancel this operation. Signed-off-by: Changbing Xiong Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/au0828/au0828-dvb.c | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 drivers/media/usb/au0828/au0828-dvb.c diff --git a/drivers/media/usb/au0828/au0828-dvb.c b/drivers/media/usb/au0828/au0828-dvb.c old mode 100644 new mode 100755 index 4ae8b1074649..2019e4a168b2 --- a/drivers/media/usb/au0828/au0828-dvb.c +++ b/drivers/media/usb/au0828/au0828-dvb.c @@ -471,6 +471,8 @@ void au0828_dvb_unregister(struct au0828_dev *dev) if (dvb->frontend == NULL) return; + cancel_work_sync(&dev->restart_streaming); + dvb_net_release(&dvb->net); dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem); dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw);