Re: [RFC V1 2/2] rtc: da9063: RTC driver

From: Alessandro Zummo
Date: Wed Mar 05 2014 - 10:41:18 EST


On Wed, 5 Mar 2014 12:25:16 +0000
"Opensource [Steve Twiss]" <stwiss.opensource@xxxxxxxxxxx> wrote:

> + if (IS_ERR(rtc->rtc_dev)) {
> + ret = PTR_ERR(rtc->rtc_dev);
> + goto err;
> + }

please,

return PTR_ERR(....)

> +
> + irq_alarm = platform_get_irq_byname(pdev, "ALARM");
> + ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL,
> + da9063_alarm_event,
> + IRQF_TRIGGER_LOW | IRQF_ONESHOT,
> + "ALARM", rtc);
> + if (ret)
> + dev_err(&pdev->dev, "Failed to request ALARM IRQ %d: %d\n",
> + irq_alarm, ret);
> +
> + da9063_data_to_tm(data, &rtc->alarm_time);
> + rtc->rtc_sync = false;
> +err:
> + return ret;
> +}

if the interrupt is mandatory you should request it before registering
the rtc device. if it isn't, please return 0.


--

Best regards,

Alessandro Zummo,
Tower Technologies - Torino, Italy

http://www.towertech.it

--
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/