lkml.org 
[lkml]   [2019]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/4] i2c/busses/i2c-icy: Add LTC2990 present on 2019 board revision
> However, I'm not sure I'm supposed to do that. I went by Documentation/i2c/instantiating-devices, which in "Method 2" says:
>
> The driver which instantiated the I2C device is responsible for destroying
> it on cleanup. This is done by calling i2c_unregister_device() on the
> pointer that was earlier returned by i2c_new_device() or
> i2c_new_probed_device().
>
>
> So, what is preferred and why?

What the documentation says is preferred. For consistency and because of
the general "free what you allocated" rule. If we have arguments to
change that for i2c_unregister_device(), we would need to do this
tree-wide anyhow. Until then, the above is valid.

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-08-14 21:53    [W:0.164 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site