On Fri, Mar 22, 2013 at 03:58:01PM -0700, H Hartley Sweeten wrote:
> This macro relies on a local variable having a specific name. Replace
> it with a new helper function, s626_mc_test().
> 
> -#define MC_TEST(REGADRS, CTRLWORD)   ((readl(devpriv->base_addr+(REGADRS)) & 
> CTRLWORD) != 0)
> +static bool s626_mc_test(struct comedi_device *dev,
> +                      unsigned int cmd, unsigned int reg)
> +{
> +     struct s626_private *devpriv = dev->private;
> +     unsigned int val;
> +
> +     val = readl(devpriv->base_addr + reg);
> +
> +     return (reg & cmd) ? true : false;
                ^^^
This should be "val" instead of "reg".

regards,
dan carpenter

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to