Skip to contentSkip to conversation

input: serio: drop warnings in case of EPROBE_DEFER from serio_find_driver()

PATCH Applied Grygorii Strashko 3 participants 3 messages Jan 15, 2016 – Jan 16, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 input: serio: drop warnings in case of EPROBE_DEFER from serio_find_driver()

Now serio_find_driver() will print warnings in case device_attach() returns -EPROBE_DEFER. Those warnings are obsolete, in genral, because:
- DD core can report the same if required
- since commit 013c074f8642 ("PM / sleep: prohibit devices probing during suspend/hibernation") the devices probing is prohibited during System suspend and deferred device will be carefully reprobed once Resume is finished.

Hence, drop warnings in case of EPROBE_DEFER from serio_find_driver().

Cc Dmitry Torokhov <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
---
 drivers/input/serio/serio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/serio/serio.c +1 -1
index 8f82897..1ca7f55 100644
@@ -134,7 +134,7 @@ static void serio_find_driver(struct serio *serio)
 	int error;
 
 	error = device_attach(&serio->dev);
-	if (error < 0)
+	if (error < 0 && error != -EPROBE_DEFER)
 		dev_warn(&serio->dev,
 			 "device_attach() failed for %s (%s), error: %d\n",
 			 serio->phys, serio->name, error);
Signature · 1 line
2.7.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Grygorii Strashko

Now serio_find_driver() will print warnings in case device_attach() returns -EPROBE_DEFER. Those warnings are obsolete, in genral, because:
- DD core can report the same if required
- since commit 013c074f8642 ("PM / sleep: prohibit devices probing during suspend/hibernation") the devices probing is prohibited during System suspend and deferred device will be carefully reprobed once Resume is finished.

Quoted 5 lines

Hence, drop warnings in case of EPROBE_DEFER from serio_find_driver().

Cc Dmitry Torokhov <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Quoted 18 lines
---
 drivers/input/serio/serio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/serio/serio.c +1 -1
index 8f82897..1ca7f55 100644
@@ -134,7 +134,7 @@ static void serio_find_driver(struct serio *serio)
 	int error;
 
 	error = device_attach(&serio->dev);
-	if (error < 0)
+	if (error < 0 && error != -EPROBE_DEFER)
 		dev_warn(&serio->dev,
 			 "device_attach() failed for %s (%s), error: %d\n",
 			 serio->phys, serio->name, error);
Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
maintainer Applied
#2 lore raw
Quoted 9 lines · Rafael J. Wysocki
Quoted 8 lines · Grygorii Strashko

Now serio_find_driver() will print warnings in case device_attach() returns -EPROBE_DEFER. Those warnings are obsolete, in genral, because:
- DD core can report the same if required
- since commit 013c074f8642 ("PM / sleep: prohibit devices probing during suspend/hibernation") the devices probing is prohibited during System suspend and deferred device will be carefully reprobed once Resume is finished.

Quoted 7 lines
Quoted 5 lines

Hence, drop warnings in case of EPROBE_DEFER from serio_find_driver().

Cc Dmitry Torokhov <[email protected]>
Cc Rafael J. Wysocki <[email protected]>

Applied, thank you.

Quoted 23 lines
Quoted 19 lines
---
 drivers/input/serio/serio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/serio/serio.c +1 -1
index 8f82897..1ca7f55 100644
@@ -134,7 +134,7 @@ static void serio_find_driver(struct serio *serio)
 	int error;
 
 	error = device_attach(&serio->dev);
-	if (error < 0)
+	if (error < 0 && error != -EPROBE_DEFER)
 		dev_warn(&serio->dev,
 			 "device_attach() failed for %s (%s), error: %d\n",
 			 serio->phys, serio->name, error);
Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
Signature · 1 line
Dmitry