Re: [PATCH 1/1] RTC:driver for Cortina's SOC

From: Joe Perches
Date: Tue May 12 2015 - 13:09:48 EST


On Tue, 2015-05-12 at 18:53 +0200, Hans Ulli Kroll wrote:
> Driver for the on chip RTC found on Cortina's SoC Gemini.
[]
> Hope I missed nothing ;-)

Nothing important enough to stop this being applied
as far as I can tell.

Just a trivial typo or two

> diff --git a/drivers/rtc/rtc-gemini.c b/drivers/rtc/rtc-gemini.c
[]
> + * Original code for older kernel 2.6.15 are form Stormlinksemi

form/from

> + * first update from Janos Laube for > 2.6.29 kernels
> + *
> + * checkpatch fixes and usage off rtc-lib code

off/of

> +static int gemini_rtc_set_time(struct device *dev, struct rtc_time *tm)
> +{
> + struct gemini_rtc *rtc = dev_get_drvdata(dev);
> + unsigned int sec, min, hour, day;
> + unsigned long offset, time;
> +
> + if (tm->tm_year >= 2148) /* EPOCH Year + 179 */
> + return -EINVAL;

obviously defective hardware...

> +static int gemini_rtc_probe(struct platform_device *pdev)
> +{
> + struct gemini_rtc *rtc;
> + struct device *dev = &pdev->dev;
> + struct resource *res;
> + int ret;
> +
> + rtc = kzalloc(sizeof(*rtc), GFP_KERNEL);
> + if (unlikely(!rtc))
> + return -ENOMEM;

likely unnecessary unlikely


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/