From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Belloni Subject: Re: [PATCH v3 4/8] rtc: ac100: Add RTC driver for X-Powers AC100 Date: Sun, 26 Jun 2016 03:02:00 +0200 Message-ID: <20160626010200.GZ5809@piout.net> References: <1466391138-12862-1-git-send-email-wens@csie.org> <1466391138-12862-5-git-send-email-wens@csie.org> Reply-To: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Sender: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: <1466391138-12862-5-git-send-email-wens-jdAy2FN1RRM@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Chen-Yu Tsai Cc: Mark Brown , Lee Jones , Alessandro Zummo , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Maxime Ripard , Michael Turquette , Stephen Boyd , rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: devicetree@vger.kernel.org On 20/06/2016 at 10:52:14 +0800, Chen-Yu Tsai wrote : > +static int ac100_rtc_probe(struct platform_device *pdev) > +{ > + struct ac100_dev *ac100 = dev_get_drvdata(pdev->dev.parent); > + struct ac100_rtc_dev *chip; > + int ret; > + > + chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL); > + platform_set_drvdata(pdev, chip); > + chip->dev = &pdev->dev; > + chip->regmap = ac100->regmap; > + mutex_init(&chip->mutex); > + > + chip->irq = of_irq_get(pdev->dev.of_node, 0); Forgot that one, platform_get_irq() is probably more common but I don't care that much. I think you can then avoid including of.h and of_irq.h. > + if (chip->irq < 0) { > + dev_err(&pdev->dev, "No IRQ resource\n"); > + return chip->irq; > + } > + -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout.