lkml.org 
[lkml]   [2014]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rtc: add support for maxim dallas rtc ds1343 and ds1344
On Wed,  7 May 2014 00:33:56 +0530 Raghavendra Ganiga <ravi23ganiga@gmail.com> wrote:

> This is a patch to add support for
> maxim dallas rtc ds1343 and ds1344
>
> ...
>
> +static int ds1343_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
> +{
> + switch (cmd) {
> +#ifdef RTC_SET_CHARGE
> + case RTC_SET_CHARGE:
> + {
> + int val;
> +
> + if (copy_from_user(&val, (int __user *)arg, sizeof(int)))
> + return -EFAULT;
> +
> + return regmap_write(priv->map, DS1343_TRICKLE_REG, val);
> + }
> + break;
> +#endif
> + }

Why is RTC_SET_CHARGE defined only for m32r? It seems pretty generic?

> + return -ENOIOCTLCMD;
> +}

It's possible that this should be -ENOTTY. I always forget the rule,
but Alan never forgets anything ;)



\
 
 \ /
  Last update: 2014-05-08 00:21    [W:0.036 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site