Re: [PATCH v3] i2c: Add i2c_get_match_data()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +const void *i2c_get_match_data(const struct i2c_client *client) {
> > +       struct device_driver *drv = client->dev.driver;
> > +       struct i2c_driver *driver = to_i2c_driver(drv);
> > +       const struct i2c_device_id *match;
> > +       const void *data;
> > +
> > +       data = device_get_match_data(&client->dev);
> 
>     if (data)
>             return data;

I like Biju's version a tad more. Except for errors, and especially
within small functions, I think single exit points are easier to
understand.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux