]> git.baikalelectronics.ru Git - kernel.git/commit
mod_devicetable: fix PHY module format
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 19 Dec 2019 23:24:47 +0000 (23:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Dec 2019 05:47:04 +0000 (21:47 -0800)
commitb66d4d2b18a68b4c191b34cb5b1a36f2701d1a41
tree7cc1daa70a24c5e38ab4a6250930a05d1fe60b75
parent42a5dc18390c64e793553f3e5c01c505365df87b
mod_devicetable: fix PHY module format

When a PHY is probed, if the top bit is set, we end up requesting a
module with the string "mdio:-10101110000000100101000101010001" -
the top bit is printed to a signed -1 value. This leads to the module
not being loaded.

Fix the module format string and the macro generating the values for
it to ensure that we only print unsigned types and the top bit is
always 0/1. We correctly end up with
"mdio:10101110000000100101000101010001".

Fixes: 0553d60146ae ("phylib: Support phy module autoloading")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/mod_devicetable.h