On Friday 11 September 2009 10:55:45 pm Herton Ronaldo Krzesinski wrote: > Em Qui 10 Set 2009, às 20:02:53, Bjorn Helgaas escreveu: > > > + ret = acpi_bus_register_driver(&acpi_topstar_driver); > > > + if (ret < 0) > > > + return ret; > > > + > > > + if (!found_tps_dev) { > > > > Why do we need this check to see if we found a device? This box > > nicely supplies a device with a _HID, so we should get a udev > > event requesting a driver for TPSACPI01, and that is what should > > cause this driver to be loaded. > > It's needed because someone can modprobe the module manually in a machine that > doesn't have TPSACPI01, and acpi_bus_register_driver doesn't fail in this case, > so the additional check (I want ENODEV to be returned). I don't think there's any reason to have extra code in the driver to deal with this case. If a user manually modprobes a driver, and the driver doesn't claim any devices, it's very typical for the driver to remain loaded. In my opinion, it's better to have consistency in that behavior than to try to help the user recover from a mistaken manual modprobe. Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html