From patchwork Sun Nov 8 21:28:45 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Richter X-Patchwork-Id: 2028 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Sun, 08 Nov 2009 21:29:21 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra.chehab.org with IMAP (fetchmail-6.3.6) for (single-drop); Sun, 08 Nov 2009 19:31:19 -0200 (BRST) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1N7FK4-00043g-OI; Sun, 08 Nov 2009 21:29:20 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754675AbZKHV27 (ORCPT + 1 other); Sun, 8 Nov 2009 16:28:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752673AbZKHV26 (ORCPT ); Sun, 8 Nov 2009 16:28:58 -0500 Received: from einhorn.in-berlin.de ([192.109.42.8]:36291 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750845AbZKHV26 (ORCPT ); Sun, 8 Nov 2009 16:28:58 -0500 X-Envelope-From: stefanr@s5r6.in-berlin.de Received: from stein ([83.221.231.7]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id nA8LSkZA006120; Sun, 8 Nov 2009 22:28:46 +0100 Date: Sun, 8 Nov 2009 22:28:45 +0100 (CET) From: Stefan Richter Subject: [PATCH 1/4] firedtv: move remote control workqueue handling into rc source file To: linux-media@vger.kernel.org cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Disposition: INLINE X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Preparation for the port of firedtv to the firewire-core kernel API: Canceling of the remote control workqueue job is factored into firedtv-rc.c. Plus trivial whitespace change. Signed-off-by: Stefan Richter --- drivers/media/dvb/firewire/firedtv-1394.c | 5 +++-- drivers/media/dvb/firewire/firedtv-rc.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) Index: linux-2.6.31.4/drivers/media/dvb/firewire/firedtv-1394.c =================================================================== --- linux-2.6.31.4.orig/drivers/media/dvb/firewire/firedtv-1394.c +++ linux-2.6.31.4/drivers/media/dvb/firewire/firedtv-1394.c @@ -212,6 +212,7 @@ static int node_probe(struct device *dev goto fail; avc_register_remote_control(fdtv); + return 0; fail: spin_lock_irq(&node_list_lock); @@ -220,6 +221,7 @@ fail: fdtv_unregister_rc(fdtv); fail_free: kfree(fdtv); + return err; } @@ -233,10 +235,9 @@ static int node_remove(struct device *de list_del(&fdtv->list); spin_unlock_irq(&node_list_lock); - cancel_work_sync(&fdtv->remote_ctrl_work); fdtv_unregister_rc(fdtv); - kfree(fdtv); + return 0; } Index: linux-2.6.31.4/drivers/media/dvb/firewire/firedtv-rc.c =================================================================== --- linux-2.6.31.4.orig/drivers/media/dvb/firewire/firedtv-rc.c +++ linux-2.6.31.4/drivers/media/dvb/firewire/firedtv-rc.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "firedtv.h" @@ -163,6 +164,7 @@ fail: void fdtv_unregister_rc(struct firedtv *fdtv) { + cancel_work_sync(&fdtv->remote_ctrl_work); kfree(fdtv->remote_ctrl_dev->keycode); input_unregister_device(fdtv->remote_ctrl_dev); }