lkml.org 
[lkml]   [2015]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 2/5] soc: sunxi: Add driver for Allwinner Reduced Serial Bus
On Thu, Sep 24, 2015 at 12:05:18AM +0800, Chen-Yu Tsai wrote:

> +static int sunxi_rsb_device_probe(struct device *dev)
> +{
> + const struct sunxi_rsb_driver *drv = to_sunxi_rsb_driver(dev->driver);
> + struct sunxi_rsb_device *rdev = to_sunxi_rsb_device(dev);
> + int ret;
> +
> + if (dev->bus != &sunxi_rsb_bus)
> + return 0;

That's a bit worrying... why might this get called for something other
than a rsb device?

> +struct regmap *devm_regmap_init_sunxi_rsb(struct sunxi_rsb_device *rdev,
> + const struct regmap_config *config);

This should work most of the time but you might want to take a look at
the changes introduced in 3cfe7a74d42b (regmap: Use different lockdep
class for each regmap init call) and follow a similar pattern for RSB to
avoid spurious lockdep warnings in some configurations - see the commit
log for that change for a full explanation.

Otherwise the regmap bit of this looks good, I'll try to have another
look through at the rest of the code later.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-09-23 20:01    [W:0.111 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site