From patchwork Thu Nov 5 23:43:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Duggan X-Patchwork-Id: 7564621 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8C31FC05C6 for ; Thu, 5 Nov 2015 23:43:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B76A20751 for ; Thu, 5 Nov 2015 23:43:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 971112062E for ; Thu, 5 Nov 2015 23:43:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030346AbbKEXnQ (ORCPT ); Thu, 5 Nov 2015 18:43:16 -0500 Received: from us-mx2.synaptics.com ([192.147.44.131]:39874 "EHLO us-mx1.synaptics.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030324AbbKEXnP (ORCPT ); Thu, 5 Nov 2015 18:43:15 -0500 Received: from unknown (HELO securemail.synaptics.com) ([172.20.21.135]) by us-mx1.synaptics.com with ESMTP; 05 Nov 2015 15:43:14 -0800 Received: from USW-OWA1.synaptics-inc.local ([10.20.24.16]) by securemail.synaptics.com (PGP Universal service); Thu, 05 Nov 2015 16:43:38 -0800 X-PGP-Universal: processed; by securemail.synaptics.com on Thu, 05 Nov 2015 16:43:38 -0800 Received: from noble.synaptics-inc.local (10.4.10.145) by USW-OWA1.synaptics-inc.local (10.20.24.16) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 5 Nov 2015 15:43:14 -0800 From: Andrew Duggan To: , CC: Andrew Duggan , Dmitry Torokhov , Linus Walleij , Benjamin Tissoires , Christopher Heiny , Stephen Chandler Paul Subject: [PATCH 25/26] Input: synaptics-rmi4: remove sensor_name in platform data Date: Thu, 5 Nov 2015 15:43:05 -0800 Message-ID: <1446766985-31350-1-git-send-email-aduggan@synaptics.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-Originating-IP: [10.4.10.145] Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 platform data contained a sensor_name string which was used in debug logs to identify the device. But, the logs already contain enough information to uniquely identify the device. This patch removes the sensor_name and substitutes the transport device's name or the rmi device's when needed. Signed-off-by: Andrew Duggan Reviewed-by: Linus Walleij --- drivers/input/rmi4/rmi_bus.c | 3 +-- drivers/input/rmi4/rmi_driver.c | 7 ++----- drivers/input/rmi4/rmi_f11.c | 3 +-- drivers/input/rmi4/rmi_i2c.c | 5 +---- include/linux/rmi.h | 2 -- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/input/rmi4/rmi_bus.c b/drivers/input/rmi4/rmi_bus.c index c50ddfc..a04468d 100644 --- a/drivers/input/rmi4/rmi_bus.c +++ b/drivers/input/rmi4/rmi_bus.c @@ -54,7 +54,6 @@ bool rmi_is_physical_device(struct device *dev) int rmi_register_transport_device(struct rmi_transport_dev *xport) { static atomic_t transport_device_count = ATOMIC_INIT(0); - struct rmi_device_platform_data *pdata = &xport->pdata; struct rmi_device *rmi_dev; int error; @@ -79,7 +78,7 @@ int rmi_register_transport_device(struct rmi_transport_dev *xport) goto err_put_device; dev_dbg(xport->dev, "%s: Registered %s as %s.\n", __func__, - pdata->sensor_name, dev_name(&rmi_dev->dev)); + dev_name(rmi_dev->xport->dev), dev_name(&rmi_dev->dev)); return 0; diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c index 328a0e5..1fd6ed2 100644 --- a/drivers/input/rmi4/rmi_driver.c +++ b/drivers/input/rmi4/rmi_driver.c @@ -819,14 +819,12 @@ static int rmi_create_function(struct rmi_device *rmi_dev, { struct device *dev = &rmi_dev->dev; struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev); - const struct rmi_device_platform_data *pdata = rmi_get_platform_data(rmi_dev); int *current_irq_count = ctx; struct rmi_function *fn; int i; int error; - dev_dbg(dev, "Initializing F%02X for %s.\n", - pdt->function_number, pdata->sensor_name); + dev_dbg(dev, "Initializing F%02X.\n", pdt->function_number); fn = kzalloc(sizeof(struct rmi_function) + BITS_TO_LONGS(data->irq_count) * sizeof(unsigned long), @@ -1058,8 +1056,7 @@ static int rmi_driver_probe(struct device *dev) irq_count = 0; retval = rmi_scan_pdt(rmi_dev, &irq_count, rmi_count_irqs); if (retval < 0) { - dev_err(dev, "IRQ counting for %s failed with code %d.\n", - pdata->sensor_name, retval); + dev_err(dev, "IRQ counting failed with code %d.\n", retval); goto err_free_mem; } data->irq_count = irq_count; diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c index 10a0c11..33da583 100644 --- a/drivers/input/rmi4/rmi_f11.c +++ b/drivers/input/rmi4/rmi_f11.c @@ -1038,8 +1038,7 @@ static int rmi_f11_initialize(struct rmi_function *fn) u8 buf; int mask_size; - dev_dbg(&fn->dev, "Initializing F11 values for %s.\n", - pdata->sensor_name); + dev_dbg(&fn->dev, "Initializing F11 values.\n"); mask_size = BITS_TO_LONGS(drvdata->irq_count) * sizeof(unsigned long); diff --git a/drivers/input/rmi4/rmi_i2c.c b/drivers/input/rmi4/rmi_i2c.c index 62cc8ba..6c63623 100644 --- a/drivers/input/rmi4/rmi_i2c.c +++ b/drivers/input/rmi4/rmi_i2c.c @@ -211,10 +211,7 @@ static int rmi_i2c_probe(struct i2c_client *client, if (!client->dev.of_node) *pdata = *client_pdata; - dev_dbg(&client->dev, "Probing %s at %#02x.\n", - pdata->sensor_name ? pdata->sensor_name : "-no name-", - client->addr); - + dev_dbg(&client->dev, "Probing %s.\n", dev_name(&client->dev)); if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { dev_err(&client->dev, "adapter does not support required functionality.\n"); diff --git a/include/linux/rmi.h b/include/linux/rmi.h index 2e4c658..c5663c7 100644 --- a/include/linux/rmi.h +++ b/include/linux/rmi.h @@ -267,8 +267,6 @@ struct rmi_device_platform_data_spi { * functions. */ struct rmi_device_platform_data { - char *sensor_name; /* Used for diagnostics. */ - int irq_flags; int poll_interval_ms;