From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752616AbbCWQLV (ORCPT ); Mon, 23 Mar 2015 12:11:21 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:35687 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752363AbbCWQLQ (ORCPT ); Mon, 23 Mar 2015 12:11:16 -0400 Date: Mon, 23 Mar 2015 16:11:10 +0000 From: Lee Jones To: Linus Walleij Cc: Samuel Ortiz , Dmitry Torokhov , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: Re: [PATCH 2/2] mfd: stmpe: move platform data into mfd driver Message-ID: <20150323161110.GR24804@x1> References: <1427124553-27551-1-git-send-email-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1427124553-27551-1-git-send-email-linus.walleij@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 23 Mar 2015, Linus Walleij wrote: > The STMPE platform data is only populated from the device tree > in all existing users, so push the struct and make the OF case > the norm. > > Signed-off-by: Linus Walleij > --- > drivers/mfd/stmpe.c | 41 ++++++++++++++++++++++++++++++----------- > include/linux/mfd/stmpe.h | 23 +---------------------- > 2 files changed, 31 insertions(+), 33 deletions(-) > > diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c > index 2d7fae94c861..cb5f19749442 100644 > --- a/drivers/mfd/stmpe.c > +++ b/drivers/mfd/stmpe.c [...] > /* Called from client specific probe routines */ > int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum) > { > - struct stmpe_platform_data *pdata = dev_get_platdata(ci->dev); > + struct stmpe_platform_data *pdata; > struct device_node *np = ci->dev->of_node; > struct stmpe *stmpe; > int ret; > > - if (!pdata) { > - if (!np) > - return -EINVAL; > + if (!np) > + return -EINVAL; Nit: I believe this is now impossible. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog