From patchwork Mon Dec 15 09:42:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 42219 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 378FA2456A for ; Mon, 15 Dec 2014 09:42:32 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id u10sf6956982lbd.10 for ; Mon, 15 Dec 2014 01:42:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=H12AR0IA/+2iST0aBsTw4ogw7jC8oGcpB+8AbCPM31c=; b=SW7r34m3anuLTu+Y2NRd5Oll1V1Hv2mHl2Rb3JTBOmdkYrCZw7QuAKvcNCb4g/lv3P yr3qGkJUt6+ZAG1xmxLZkkxhAso6TjQXtJQkbv7YaWUB0r7F0xPIx1Ea792pzQXLxnHE MHf2mVnAIb/UzYsqkEUJReTtp278DWEf3/OcfLocQZ92dfqz2HepQzu2pahVRt0IVwRA e2QQLbumjaFzra9WVMMEX2LlX/KGT7DhgsmZVfo3GV7Pi1ZeZIPxnvZ5fk91tgHnOAUZ 7NflipMccGdveFNgP0r5+vZZQyafXHtFHQAhOlk+Makwyz6OP/7/iS2IpvKeuyfh5Weg Pqgw== X-Gm-Message-State: ALoCoQn4B1rp2v8EzkE7eNyn1KwEocwt8/50hXkBUmSo+n/ui2LFm2eE6xFa9KO3Rc82+ZhxCTNn X-Received: by 10.180.89.211 with SMTP id bq19mr2661787wib.4.1418636551007; Mon, 15 Dec 2014 01:42:31 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.137 with SMTP id 9ls113228lau.26.gmail; Mon, 15 Dec 2014 01:42:30 -0800 (PST) X-Received: by 10.152.164.232 with SMTP id yt8mr29575353lab.7.1418636550584; Mon, 15 Dec 2014 01:42:30 -0800 (PST) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id bj4si9969292lbc.26.2014.12.15.01.42.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 01:42:30 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id z12so8817752lbi.18 for ; Mon, 15 Dec 2014 01:42:30 -0800 (PST) X-Received: by 10.112.14.6 with SMTP id l6mr6560924lbc.91.1418636550448; Mon, 15 Dec 2014 01:42:30 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp660562lbb; Mon, 15 Dec 2014 01:42:29 -0800 (PST) X-Received: by 10.66.191.165 with SMTP id gz5mr48422589pac.75.1418636548354; Mon, 15 Dec 2014 01:42:28 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si10458243pdc.33.2014.12.15.01.42.27 for ; Mon, 15 Dec 2014 01:42:28 -0800 (PST) Received-SPF: none (google.com: linux-gpio-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751594AbaLOJm0 (ORCPT ); Mon, 15 Dec 2014 04:42:26 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:64858 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156AbaLOJmL (ORCPT ); Mon, 15 Dec 2014 04:42:11 -0500 Received: by mail-wi0-f182.google.com with SMTP id h11so8334216wiw.9 for ; Mon, 15 Dec 2014 01:42:10 -0800 (PST) X-Received: by 10.180.103.40 with SMTP id ft8mr29358759wib.68.1418636530140; Mon, 15 Dec 2014 01:42:10 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id t10sm12439255wix.15.2014.12.15.01.42.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Dec 2014 01:42:09 -0800 (PST) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Lee Jones , Samuel Ortiz Subject: [PATCH] gpio: tc3589x: get rid of platform data Date: Mon, 15 Dec 2014 10:42:02 +0100 Message-Id: <1418636522-21296-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This device is only used from the device tree, and the startup() and remove() callbacks are not used anywhere in the kernel, so retire them and the pdata altogether. Cc: Lee Jones Cc: Samuel Ortiz Signed-off-by: Linus Walleij Acked-by: Lee Jones --- MFD folks: this only considers GPIO but touches your include file, please ACK this so I can take it through the GPIO tree. --- drivers/gpio/gpio-tc3589x.c | 15 ++------------- include/linux/mfd/tc3589x.h | 12 ------------ 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c index abdcf58935f5..11aed2671065 100644 --- a/drivers/gpio/gpio-tc3589x.c +++ b/drivers/gpio/gpio-tc3589x.c @@ -232,16 +232,13 @@ static irqreturn_t tc3589x_gpio_irq(int irq, void *dev) static int tc3589x_gpio_probe(struct platform_device *pdev) { struct tc3589x *tc3589x = dev_get_drvdata(pdev->dev.parent); - struct tc3589x_gpio_platform_data *pdata; struct device_node *np = pdev->dev.of_node; struct tc3589x_gpio *tc3589x_gpio; int ret; int irq; - pdata = tc3589x->pdata->gpio; - - if (!(pdata || np)) { - dev_err(&pdev->dev, "No platform data or Device Tree found\n"); + if (!np) { + dev_err(&pdev->dev, "No Device Tree node found\n"); return -EINVAL; } @@ -305,9 +302,6 @@ static int tc3589x_gpio_probe(struct platform_device *pdev) irq, NULL); - if (pdata && pdata->setup) - pdata->setup(tc3589x, tc3589x_gpio->chip.base); - platform_set_drvdata(pdev, tc3589x_gpio); return 0; @@ -316,11 +310,6 @@ static int tc3589x_gpio_probe(struct platform_device *pdev) static int tc3589x_gpio_remove(struct platform_device *pdev) { struct tc3589x_gpio *tc3589x_gpio = platform_get_drvdata(pdev); - struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; - struct tc3589x_gpio_platform_data *pdata = tc3589x->pdata->gpio; - - if (pdata && pdata->remove) - pdata->remove(tc3589x, tc3589x_gpio->chip.base); gpiochip_remove(&tc3589x_gpio->chip); diff --git a/include/linux/mfd/tc3589x.h b/include/linux/mfd/tc3589x.h index e1c12d84c26a..c203c9c56776 100644 --- a/include/linux/mfd/tc3589x.h +++ b/include/linux/mfd/tc3589x.h @@ -163,24 +163,12 @@ struct tc3589x_keypad_platform_data { }; /** - * struct tc3589x_gpio_platform_data - TC3589x GPIO platform data - * @setup: callback for board-specific initialization - * @remove: callback for board-specific teardown - */ -struct tc3589x_gpio_platform_data { - void (*setup)(struct tc3589x *tc3589x, unsigned gpio_base); - void (*remove)(struct tc3589x *tc3589x, unsigned gpio_base); -}; - -/** * struct tc3589x_platform_data - TC3589x platform data * @block: bitmask of blocks to enable (use TC3589x_BLOCK_*) - * @gpio: GPIO-specific platform data * @keypad: keypad-specific platform data */ struct tc3589x_platform_data { unsigned int block; - struct tc3589x_gpio_platform_data *gpio; const struct tc3589x_keypad_platform_data *keypad; };