From patchwork Mon Oct 12 08:09:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: samu.p.onkalo@nokia.com X-Patchwork-Id: 53068 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9C8Bpxc007870 for ; Mon, 12 Oct 2009 08:11:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751244AbZJLILU (ORCPT ); Mon, 12 Oct 2009 04:11:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754515AbZJLILU (ORCPT ); Mon, 12 Oct 2009 04:11:20 -0400 Received: from smtp.nokia.com ([192.100.122.233]:33154 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751244AbZJLILT (ORCPT ); Mon, 12 Oct 2009 04:11:19 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9C89U2k002096; Mon, 12 Oct 2009 11:09:49 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 12 Oct 2009 11:09:44 +0300 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 12 Oct 2009 11:09:44 +0300 Received: from localhost.localdomain (4fid08082.ntc.nokia.com [172.22.144.188]) by mgw-sa02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9C89gm5000568; Mon, 12 Oct 2009 11:09:43 +0300 From: Samu Onkalo To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, Samu Onkalo Subject: [PATCH 1/1] Polled input device: Add closing indication Date: Mon, 12 Oct 2009 11:09:41 +0300 Message-Id: <1255334981-24118-2-git-send-email-samu.p.onkalo@nokia.com> X-Mailer: git-send-email 1.5.6.3 In-Reply-To: <1255334981-24118-1-git-send-email-samu.p.onkalo@nokia.com> References: <1255334981-24118-1-git-send-email-samu.p.onkalo@nokia.com> X-OriginalArrivalTime: 12 Oct 2009 08:09:44.0462 (UTC) FILETIME=[5B7952E0:01CA4B13] X-Nokia-AV: Clean Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c index 0d3ce7a..50e1cb4 100644 --- a/drivers/input/input-polldev.c +++ b/drivers/input/input-polldev.c @@ -95,6 +95,9 @@ static void input_close_polled_device(struct input_dev *input) cancel_delayed_work_sync(&dev->work); input_polldev_stop_workqueue(); + + if (dev->close) + dev->close(dev); } /** diff --git a/include/linux/input-polldev.h b/include/linux/input-polldev.h index 597a007..23a6fc6 100644 --- a/include/linux/input-polldev.h +++ b/include/linux/input-polldev.h @@ -32,6 +32,7 @@ struct input_polled_dev { void (*flush)(struct input_polled_dev *dev); void (*poll)(struct input_polled_dev *dev); + void (*close)(struct input_polled_dev *dev); unsigned int poll_interval; /* msec */ struct input_dev *input;