We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5150d3a commit 53c5bbcCopy full SHA for 53c5bbc
drivers/rtc/rtc-pcf85063.c
@@ -322,7 +322,16 @@ static const struct rtc_class_ops pcf85063_rtc_ops = {
322
static int pcf85063_nvmem_read(void *priv, unsigned int offset,
323
void *val, size_t bytes)
324
{
325
- return regmap_read(priv, PCF85063_REG_RAM, val);
+ unsigned int tmp;
326
+ int ret;
327
+
328
+ ret = regmap_read(priv, PCF85063_REG_RAM, &tmp);
329
+ if (ret < 0)
330
+ return ret;
331
332
+ *(u8 *)val = tmp;
333
334
+ return 0;
335
}
336
337
static int pcf85063_nvmem_write(void *priv, unsigned int offset,
0 commit comments