From mboxrd@z Thu Jan 1 00:00:00 1970 From: lee.jones@linaro.org (Lee Jones) Date: Fri, 14 Feb 2014 15:28:38 +0000 Subject: [PATCH 1/2] mfd: twl4030-madc: Add devicetree support. In-Reply-To: References: <1392383861-14169-1-git-send-email-marek@goldelico.com> <20140214134815.GD13293@lee--X1> Message-ID: <20140214152838.GA30687@lee--X1> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org > >> Signed-off-by: Marek Belisko > >> --- > >> .../devicetree/bindings/mfd/twl4030-madc.txt | 18 +++++++++++++ > >> drivers/mfd/twl4030-madc.c | 31 > >> ++++++++++++++++++++-- > > > >> +static struct twl4030_madc_platform_data * > >> + twl4030_madc_of_parse(struct platform_device *pdev) > >> +{ > >> + struct twl4030_madc_platform_data *pdata; > >> + > >> + pdata = devm_kzalloc(&pdev->dev, > >> + sizeof(struct twl4030_madc_platform_data), GFP_KERNEL); > > > > s/struct twl4030_madc_platform_data/*pdata/ > Right typo. Sorry, my comment of ambiguous. I mean do this: sizeof(*pdata) ... instead of this: sizeof(struct twl4030_madc_platform_data) > >> + if (!pdata) > >> + return ERR_PTR(-ENOMEM); > >> + > >> + pdata->irq_line = platform_get_irq(pdev, 0); > > > > Why weren't 'resources' used in the original implementation? > Not sure I'm not an author :). It's passed in platform data. Yes, I saw that. It should be changed. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH 1/2] mfd: twl4030-madc: Add devicetree support. Date: Fri, 14 Feb 2014 15:28:38 +0000 Message-ID: <20140214152838.GA30687@lee--X1> References: <1392383861-14169-1-git-send-email-marek@goldelico.com> <20140214134815.GD13293@lee--X1> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Belisko Marek Cc: Rob Herring , Pawel Moll , Mark Rutland , "ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org" , Kumar Gala , Rob Landley , Russell King - ARM Linux , Grant Likely , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "Dr. H. Nikolaus Schaller" , LKML , linux-arm-kernel List-Id: devicetree@vger.kernel.org > >> Signed-off-by: Marek Belisko > >> --- > >> .../devicetree/bindings/mfd/twl4030-madc.txt | 18 +++++++++= ++++ > >> drivers/mfd/twl4030-madc.c | 31 > >> ++++++++++++++++++++-- > > > >> +static struct twl4030_madc_platform_data * > >> + twl4030_madc_of_parse(struct platform_device *pdev) > >> +{ > >> + struct twl4030_madc_platform_data *pdata; > >> + > >> + pdata =3D devm_kzalloc(&pdev->dev, > >> + sizeof(struct twl4030_madc_platform_data), G= =46P_KERNEL); > > > > s/struct twl4030_madc_platform_data/*pdata/ > Right typo. Sorry, my comment of ambiguous. I mean do this: sizeof(*pdata) =2E.. instead of this: sizeof(struct twl4030_madc_platform_data) > >> + if (!pdata) > >> + return ERR_PTR(-ENOMEM); > >> + > >> + pdata->irq_line =3D platform_get_irq(pdev, 0); > > > > Why weren't 'resources' used in the original implementation? > Not sure I'm not an author :). It's passed in platform data. Yes, I saw that. It should be changed. --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752264AbaBNP2r (ORCPT ); Fri, 14 Feb 2014 10:28:47 -0500 Received: from mail-wi0-f175.google.com ([209.85.212.175]:45183 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbaBNP2p (ORCPT ); Fri, 14 Feb 2014 10:28:45 -0500 Date: Fri, 14 Feb 2014 15:28:38 +0000 From: Lee Jones To: Belisko Marek Cc: Rob Herring , Pawel Moll , Mark Rutland , "ijc+devicetree@hellion.org.uk" , Kumar Gala , Rob Landley , Russell King - ARM Linux , Grant Likely , "devicetree@vger.kernel.org" , "linux-doc@vger.kernel.org" , "Dr. H. Nikolaus Schaller" , LKML , linux-arm-kernel Subject: Re: [PATCH 1/2] mfd: twl4030-madc: Add devicetree support. Message-ID: <20140214152838.GA30687@lee--X1> References: <1392383861-14169-1-git-send-email-marek@goldelico.com> <20140214134815.GD13293@lee--X1> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 > >> Signed-off-by: Marek Belisko > >> --- > >> .../devicetree/bindings/mfd/twl4030-madc.txt | 18 +++++++++++++ > >> drivers/mfd/twl4030-madc.c | 31 > >> ++++++++++++++++++++-- > > > >> +static struct twl4030_madc_platform_data * > >> + twl4030_madc_of_parse(struct platform_device *pdev) > >> +{ > >> + struct twl4030_madc_platform_data *pdata; > >> + > >> + pdata = devm_kzalloc(&pdev->dev, > >> + sizeof(struct twl4030_madc_platform_data), GFP_KERNEL); > > > > s/struct twl4030_madc_platform_data/*pdata/ > Right typo. Sorry, my comment of ambiguous. I mean do this: sizeof(*pdata) ... instead of this: sizeof(struct twl4030_madc_platform_data) > >> + if (!pdata) > >> + return ERR_PTR(-ENOMEM); > >> + > >> + pdata->irq_line = platform_get_irq(pdev, 0); > > > > Why weren't 'resources' used in the original implementation? > Not sure I'm not an author :). It's passed in platform data. Yes, I saw that. It should be changed. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog