From mboxrd@z Thu Jan 1 00:00:00 1970 From: Varka Bhadram Subject: Re: [PATCH v6 3/7] iio: Add support for DA9150 GPADC Date: Wed, 21 Jan 2015 21:36:47 +0530 Message-ID: <54BFCE97.4050007@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-iio-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Adam Thomson , Lee Jones , Samuel Ortiz , Jonathan Cameron , Hartmut Knaack , linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Grant Likely , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , Joe Perches Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, support.opensource-WBD+wuPFNBhBDgjK7y7TUQ@public.gmane.org List-Id: linux-pm@vger.kernel.org On Wednesday 21 January 2015 09:16 PM, Adam Thomson wrote: > This patch adds support for DA9150 Charger & Fuel-Gauge IC GPADC. > > Signed-off-by: Adam Thomson > Reviewed-by: Hartmut Knaack > Acked-by: Jonathan Cameron (...) > + > +static int da9150_gpadc_probe(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct da9150 *da9150 = dev_get_drvdata(dev->parent); > + struct da9150_gpadc *gpadc; > + struct iio_dev *indio_dev; > + int irq, ret; > + > + indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*gpadc)); You can directly use *dev* instead of *&pdev->dev* -- Thanks and Regards, Varka Bhadram.