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 Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux