From patchwork Sat Dec 28 01:58:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Heiny X-Patchwork-Id: 3413051 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 057F9C02DC for ; Sat, 28 Dec 2013 01:58:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4256B2015E for ; Sat, 28 Dec 2013 01:58:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4FD8520123 for ; Sat, 28 Dec 2013 01:58:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754613Ab3L1B61 (ORCPT ); Fri, 27 Dec 2013 20:58:27 -0500 Received: from us-mx2.synaptics.com ([192.147.44.131]:33457 "EHLO us-mx2.synaptics.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754564Ab3L1B61 (ORCPT ); Fri, 27 Dec 2013 20:58:27 -0500 Received: from unknown (HELO securemail.synaptics.com) ([172.20.21.135]) by us-mx2.synaptics.com with ESMTP; 27 Dec 2013 17:58:24 -0800 Received: from USW-OWA1.synaptics-inc.local ([10.20.24.16]) by securemail.synaptics.com (PGP Universal service); Fri, 27 Dec 2013 17:48:33 -0800 X-PGP-Universal: processed; by securemail.synaptics.com on Fri, 27 Dec 2013 17:48:33 -0800 Received: from brontomerus.synaptics.com (10.3.20.103) by USW-OWA1.synaptics-inc.local (10.20.24.15) with Microsoft SMTP Server (TLS) id 14.3.123.3; Fri, 27 Dec 2013 17:58:24 -0800 From: Christopher Heiny To: Dmitry Torokhov CC: Linux Input , Christopher Heiny , Andrew Duggan , Vincent Huang , Vivian Ly , Daniel Rosenberg , Jean Delvare , Joerie de Gram , Linus Walleij , Benjamin Tissoires Subject: [PATCH] input synaptics-rmi4: Delete some obsolete code Date: Fri, 27 Dec 2013 17:58:07 -0800 Message-ID: <1388195887-26503-1-git-send-email-cheiny@synaptics.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.3.20.103] X-Brightmail-Tracker: AAAAAQAAAWE= Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@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 The answer to the question "is this crap needed with F01 always present?" is "no, it's not". Also delete obsolete [suspend|resume]_one_device. Signed-off-by: Christopher Heiny Cc: Dmitry Torokhov Cc: Benjamin Tissoires --- drivers/input/rmi4/rmi_driver.c | 48 ----------------------------------------- 1 file changed, 48 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c index 2ae9af9..a4e5236 100644 --- a/drivers/input/rmi4/rmi_driver.c +++ b/drivers/input/rmi4/rmi_driver.c @@ -686,39 +686,6 @@ error_exit: return retval; } -#if 0 -// XXX is this crap needed with F01 always present? -static int f01_notifier_call(struct notifier_block *nb, - unsigned long action, void *data) -{ - struct device *dev = data; - struct rmi_function *fn; - - if (!rmi_is_function_device(dev)) - return 0; - - fn = to_rmi_function(dev); - if (fn->fd.function_number != 0x01) - return 0; - - switch (action) { - case BUS_NOTIFY_BOUND_DRIVER: - dev_dbg(dev, "%s: F01 driver bound.\n", __func__); - enable_sensor(fn->rmi_dev); - break; - case BUS_NOTIFY_UNBIND_DRIVER: - dev_dbg(dev, "%s: F01 driver going away.\n", __func__); - disable_sensor(fn->rmi_dev); - break; - } - return 0; -} - -static struct notifier_block rmi_bus_notifier = { - .notifier_call = f01_notifier_call, -}; -#endif - #ifdef CONFIG_PM_SLEEP static int rmi_driver_suspend(struct device *dev) { @@ -738,13 +705,6 @@ static int rmi_driver_suspend(struct device *dev) disable_sensor(rmi_dev); -#if 0 - /** Do it backwards so F01 comes last. */ - list_for_each_entry_reverse(entry, &data->function_list, node) - if (suspend_one_device(entry) < 0) - goto exit; -#endif - if (data->post_suspend) retval = data->post_suspend(data->pm_data); @@ -768,14 +728,6 @@ static int rmi_driver_resume(struct device *dev) goto exit; } -#if 0 - /** Do it forwards, so F01 comes first. */ - list_for_each_entry(entry, &data->function_list, node) { - if (resume_one_device(entry) < 0) - goto exit; - } -#endif - retval = enable_sensor(rmi_dev); if (retval) goto exit;