> > +static int gpio_joy_probe(struct platform_device *pdev) {
> > +   struct device *dev = &pdev->dev;
> > +   struct input_dev *input;
> > +   struct gpio_joy_drvdata *ddata;
> > +   int i, err;
> > +   unsigned int debounce_ms;
> 
> This should be a u32 given you pass it to a function expecting a u32 pointer.
> 
> > +
> > +   ddata = devm_kzalloc(dev, sizeof(struct gpio_joy_drvdata),
> > +GFP_KERNEL);
> 
> Use sizeof(*ddata)
> 
> [...]
> 
> > +   return 0;
> > +fail:
> > +   return err;
> > +}
> 
> Given there's no cleanup, the fail path seems redundant.
> 
> [...]
> 
> > +static const struct of_device_id gpio_joy_of_match[] = {
> > +   { .compatible = DRV_NAME, },
> > +   { },
> > +};
> 
> The compatible string should be independent of DRV_NAME, because it must
> match the binding. The driver can be arbitrarily and independently renamed.
> 

I'll address all of these comments, thanks for reviewing!
Hans
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to