<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/extcon/extcon.c, branch v6.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-05-29T14:41:29Z</updated>
<entry>
<title>extcon: Drop unneeded assignments</title>
<updated>2023-05-29T14:41:29Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-04-11T11:48:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93e60cd5e00e63f29e896453e10c7ede4cd8e882'/>
<id>urn:sha1:93e60cd5e00e63f29e896453e10c7ede4cd8e882</id>
<content type='text'>
In one case the assignment is duplicative, in the other,
it's better to move it into the loop — the user of it.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Use sizeof(*pointer) instead of sizeof(type)</title>
<updated>2023-05-29T14:41:29Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-04-11T11:48:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ef753fb4e86607afc6228d8632705122bc67f29a'/>
<id>urn:sha1:ef753fb4e86607afc6228d8632705122bc67f29a</id>
<content type='text'>
It is preferred to use sizeof(*pointer) instead of sizeof(type).
The type of the variable can change and one needs not change
the former (unlike the latter). No functional change intended.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Use unique number for the extcon device ID</title>
<updated>2023-05-29T14:41:29Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-04-11T11:48:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7bba9e81a6fbf00daa4063c41da6b250d339f43b'/>
<id>urn:sha1:7bba9e81a6fbf00daa4063c41da6b250d339f43b</id>
<content type='text'>
The use of atomic variable is still racy when we do not control which
device has been unregistered and there is a (theoretical) possibility
of the overflow that may cause a duplicate extcon device ID number
to be allocated next time a device is registered.

Replace above mentioned approach by using IDA framework.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Remove dup device name in the message and unneeded error check</title>
<updated>2023-05-29T14:41:29Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-22T14:40:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=566825a31f65da111270abac35662502706e7c8a'/>
<id>urn:sha1:566825a31f65da111270abac35662502706e7c8a</id>
<content type='text'>
The device name is already printed with dev_err(), no need to repeat.
The device pointer itself is not supposed to be an error point, drop
that check.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Use dev_of_node(dev) instead of dev-&gt;of_node</title>
<updated>2023-05-29T14:41:29Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-22T14:40:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b4aea51cbcaefacaac655392f360bb3929ab63d'/>
<id>urn:sha1:9b4aea51cbcaefacaac655392f360bb3929ab63d</id>
<content type='text'>
The dev_of_node function should be preferred.
In the result we may drop unneeded NULL check
of the pointer to the device object.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Use device_match_of_node() helper</title>
<updated>2023-05-29T14:41:29Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-22T14:40:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0146f56b91a8ad287e7c94ea340b95a7040d29cf'/>
<id>urn:sha1:0146f56b91a8ad287e7c94ea340b95a7040d29cf</id>
<content type='text'>
Instead of open coding, use device_match_of_node() helper.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Use sysfs_emit() to instead of sprintf()</title>
<updated>2023-05-29T14:41:28Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-22T14:39:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ee0a22e8694074877550bf4284cc4085f86dd4f'/>
<id>urn:sha1:6ee0a22e8694074877550bf4284cc4085f86dd4f</id>
<content type='text'>
Follow the advice of the Documentation/filesystems/sysfs.rst that
show() should only use sysfs_emit() or sysfs_emit_at() when formatting
the value to be returned to user space.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Use DECLARE_BITMAP() to declare bit arrays</title>
<updated>2023-05-29T14:41:28Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-22T14:39:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6e4e8670c03b4fcac54bca8b62e5465182caeb26'/>
<id>urn:sha1:6e4e8670c03b4fcac54bca8b62e5465182caeb26</id>
<content type='text'>
Bit arrays has a specific type helper for the declaration.
Use it instead of homegronw equivalent.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Fix kernel doc of property capability fields to avoid warnings</title>
<updated>2023-05-29T14:41:28Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-22T14:39:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=73346b9965ebda2feb7fef8629e9b28baee820e3'/>
<id>urn:sha1:73346b9965ebda2feb7fef8629e9b28baee820e3</id>
<content type='text'>
Kernel documentation has to be synchronized with a code, otherwise
the validator is not happy:

     Function parameter or member 'usb_bits' not described in 'extcon_cable'
     Function parameter or member 'chg_bits' not described in 'extcon_cable'
     Function parameter or member 'jack_bits' not described in 'extcon_cable'
     Function parameter or member 'disp_bits' not described in 'extcon_cable'

Describe the fields added in the past.

Fixes: ceaa98f442cf ("extcon: Add the support for the capability of each property")
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>extcon: Fix kernel doc of property fields to avoid warnings</title>
<updated>2023-05-29T14:41:28Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-03-22T14:39:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7e77e0b7a9f4cdf91cb0950749b40c840ea63efc'/>
<id>urn:sha1:7e77e0b7a9f4cdf91cb0950749b40c840ea63efc</id>
<content type='text'>
Kernel documentation has to be synchronized with a code, otherwise
the validator is not happy:

     Function parameter or member 'usb_propval' not described in 'extcon_cable'
     Function parameter or member 'chg_propval' not described in 'extcon_cable'
     Function parameter or member 'jack_propval' not described in 'extcon_cable'
     Function parameter or member 'disp_propval' not described in 'extcon_cable'

Describe the fields added in the past.

Fixes: 067c1652e7a7 ("extcon: Add the support for extcon property according to extcon type")
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
</feed>
