When the bus id was supplied via a struct platform_device, the driver wasn't
handling -1 to mean an unspecified id of the only instance of this driver,
as the platform spec requires.
Signed-off-by: Bert Vermeulen <redacted>
---
drivers/net/phy/mdio-gpio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
From: Andrew Lunn <andrew@lunn.ch> Date: 2015-05-08 15:53:07
On Fri, May 08, 2015 at 04:18:49PM +0200, Bert Vermeulen wrote:
quoted hunk
When the bus id was supplied via a struct platform_device, the driver wasn't
handling -1 to mean an unspecified id of the only instance of this driver,
as the platform spec requires.
Signed-off-by: Bert Vermeulen <redacted>
---
drivers/net/phy/mdio-gpio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
On Fri, May 08, 2015 at 04:18:49PM +0200, Bert Vermeulen wrote:
quoted
When the bus id was supplied via a struct platform_device, the driver wasn't
handling -1 to mean an unspecified id of the only instance of this driver,
as the platform spec requires.
Signed-off-by: Bert Vermeulen <redacted>
---
drivers/net/phy/mdio-gpio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Hi Bert
What happens if there are multiple platform_device's with -1? You
should probably be using use idr_alloc().
It's an instance id per driver, not globally, and -1 specifically means it's
the only instance. From Documentation/driver-model/platform.txt:
These are concatenated, so name/id "serial"/0 indicates bus_id "serial.0", and
"serial/3" indicates bus_id "serial.3"; both would use the platform_driver
named "serial". While "my_rtc"/-1 would be bus_id "my_rtc" (no instance id)
and use the platform_driver called "my_rtc".
Hi Bert
What happens if there are multiple platform_device's with -1? You
should probably be using use idr_alloc().
It's an instance id per driver, not globally, and -1 specifically means it's
the only instance. From Documentation/driver-model/platform.txt:
Ah, did not know there can only be one with -1. I've used i2c where
this does not apply when registering adaptors. It will allocate a
unique id to each added with id = -1.
Andrew
From: Andrew Lunn <andrew@lunn.ch> Date: 2015-05-08 16:54:08
On Fri, May 08, 2015 at 04:18:49PM +0200, Bert Vermeulen wrote:
quoted hunk
When the bus id was supplied via a struct platform_device, the driver wasn't
handling -1 to mean an unspecified id of the only instance of this driver,
as the platform spec requires.
Signed-off-by: Bert Vermeulen <redacted>
---
drivers/net/phy/mdio-gpio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
When the bus id was supplied via a struct platform_device, the driver wasn't
handling -1 to mean an unspecified id of the only instance of this driver,
as the platform spec requires.
Signed-off-by: Bert Vermeulen <redacted>