From: Kevin Hilman <khilman@baylibre.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Kevin Hilman <khilman@kernel.org>
Cc: linux-rtc@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
Neil Armstrong <narmstrong@baylibre.com>
Subject: Re: [PATCH v2 2/2] rtc: Add Amlogic Virtual Wake RTC
Date: Mon, 12 Aug 2019 16:21:23 -0700 [thread overview]
Message-ID: <7h7e7i0y30.fsf@baylibre.com> (raw)
In-Reply-To: <20190812211337.GW3600@piout.net>
Alexandre Belloni <alexandre.belloni@bootlin.com> writes:
> On 07/08/2019 21:23:57-0700, Kevin Hilman wrote:
>> +static int meson_vrtc_probe(struct platform_device *pdev)
>> +{
>> + struct meson_vrtc_data *vrtc;
>> + struct resource *res;
>> +
>> + vrtc = devm_kzalloc(&pdev->dev, sizeof(*vrtc), GFP_KERNEL);
>> + if (!vrtc)
>> + return -ENOMEM;
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + vrtc->io_alarm = devm_ioremap_resource(&pdev->dev, res);
>
> You could use devm_platform_ioremap_resource.
>
>> + if (IS_ERR(vrtc->io_alarm))
>> + return PTR_ERR(vrtc->io_alarm);
>> +
>> + device_init_wakeup(&pdev->dev, 1);
>> +
>> + platform_set_drvdata(pdev, vrtc);
>> +
>> + vrtc->rtc = devm_rtc_device_register(&pdev->dev, "meson-vrtc",
>> + &meson_vrtc_ops, THIS_MODULE);
>
> Please use devm_rtc_allocate_device and rtc_register_device.
>
OK, will update both and send a v3.
Thanks for the review,
Kevin
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@baylibre.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Kevin Hilman <khilman@kernel.org>
Cc: linux-rtc@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
Neil Armstrong <narmstrong@baylibre.com>
Subject: Re: [PATCH v2 2/2] rtc: Add Amlogic Virtual Wake RTC
Date: Mon, 12 Aug 2019 16:21:23 -0700 [thread overview]
Message-ID: <7h7e7i0y30.fsf@baylibre.com> (raw)
In-Reply-To: <20190812211337.GW3600@piout.net>
Alexandre Belloni <alexandre.belloni@bootlin.com> writes:
> On 07/08/2019 21:23:57-0700, Kevin Hilman wrote:
>> +static int meson_vrtc_probe(struct platform_device *pdev)
>> +{
>> + struct meson_vrtc_data *vrtc;
>> + struct resource *res;
>> +
>> + vrtc = devm_kzalloc(&pdev->dev, sizeof(*vrtc), GFP_KERNEL);
>> + if (!vrtc)
>> + return -ENOMEM;
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + vrtc->io_alarm = devm_ioremap_resource(&pdev->dev, res);
>
> You could use devm_platform_ioremap_resource.
>
>> + if (IS_ERR(vrtc->io_alarm))
>> + return PTR_ERR(vrtc->io_alarm);
>> +
>> + device_init_wakeup(&pdev->dev, 1);
>> +
>> + platform_set_drvdata(pdev, vrtc);
>> +
>> + vrtc->rtc = devm_rtc_device_register(&pdev->dev, "meson-vrtc",
>> + &meson_vrtc_ops, THIS_MODULE);
>
> Please use devm_rtc_allocate_device and rtc_register_device.
>
OK, will update both and send a v3.
Thanks for the review,
Kevin
WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@baylibre.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Kevin Hilman <khilman@kernel.org>
Cc: linux-rtc@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
Neil Armstrong <narmstrong@baylibre.com>
Subject: Re: [PATCH v2 2/2] rtc: Add Amlogic Virtual Wake RTC
Date: Mon, 12 Aug 2019 16:21:23 -0700 [thread overview]
Message-ID: <7h7e7i0y30.fsf@baylibre.com> (raw)
In-Reply-To: <20190812211337.GW3600@piout.net>
Alexandre Belloni <alexandre.belloni@bootlin.com> writes:
> On 07/08/2019 21:23:57-0700, Kevin Hilman wrote:
>> +static int meson_vrtc_probe(struct platform_device *pdev)
>> +{
>> + struct meson_vrtc_data *vrtc;
>> + struct resource *res;
>> +
>> + vrtc = devm_kzalloc(&pdev->dev, sizeof(*vrtc), GFP_KERNEL);
>> + if (!vrtc)
>> + return -ENOMEM;
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + vrtc->io_alarm = devm_ioremap_resource(&pdev->dev, res);
>
> You could use devm_platform_ioremap_resource.
>
>> + if (IS_ERR(vrtc->io_alarm))
>> + return PTR_ERR(vrtc->io_alarm);
>> +
>> + device_init_wakeup(&pdev->dev, 1);
>> +
>> + platform_set_drvdata(pdev, vrtc);
>> +
>> + vrtc->rtc = devm_rtc_device_register(&pdev->dev, "meson-vrtc",
>> + &meson_vrtc_ops, THIS_MODULE);
>
> Please use devm_rtc_allocate_device and rtc_register_device.
>
OK, will update both and send a v3.
Thanks for the review,
Kevin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-08-12 23:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 4:23 [PATCH v2 0/2] rtc: add new Amlogic Virtual Wake RTC Kevin Hilman
2019-08-08 4:23 ` Kevin Hilman
2019-08-08 4:23 ` Kevin Hilman
2019-08-08 4:23 ` [PATCH v2 1/2] dt-bindings: rtc: new binding for Amlogic VRTC Kevin Hilman
2019-08-08 4:23 ` Kevin Hilman
2019-08-08 4:23 ` Kevin Hilman
2019-08-08 4:23 ` [PATCH v2 2/2] rtc: Add Amlogic Virtual Wake RTC Kevin Hilman
2019-08-08 4:23 ` Kevin Hilman
2019-08-08 4:23 ` Kevin Hilman
2019-08-12 21:13 ` Alexandre Belloni
2019-08-12 21:13 ` Alexandre Belloni
2019-08-12 21:13 ` Alexandre Belloni
2019-08-12 23:21 ` Kevin Hilman [this message]
2019-08-12 23:21 ` Kevin Hilman
2019-08-12 23:21 ` Kevin Hilman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7h7e7i0y30.fsf@baylibre.com \
--to=khilman@baylibre.com \
--cc=alexandre.belloni@bootlin.com \
--cc=khilman@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rtc@vger.kernel.org \
--cc=narmstrong@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.