[PATCH] sonypi: Don't print driver version until we actually find a device

From: Bjorn Helgaas
Date: Tue Jul 25 2006 - 18:35:20 EST


If we don't find any devices, we shouldn't print anything.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx>

Index: work-mm2/drivers/char/sonypi.c
===================================================================
--- work-mm2.orig/drivers/char/sonypi.c 2006-07-17 16:50:45.000000000 -0600
+++ work-mm2/drivers/char/sonypi.c 2006-07-19 16:40:34.000000000 -0600
@@ -1528,13 +1528,13 @@
{
int error;

+ if (!dmi_check_system(sonypi_dmi_table))
+ return -ENODEV;
+
printk(KERN_INFO
"sonypi: Sony Programmable I/O Controller Driver v%s.\n",
SONYPI_DRIVER_VERSION);

- if (!dmi_check_system(sonypi_dmi_table))
- return -ENODEV;
-
error = platform_driver_register(&sonypi_driver);
if (error)
return error;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/