[PATCH] Create add_rtc() function to enable the RTC CMOS driver

Arnd Bergmann arnd at arndb.de
Thu Jun 7 08:44:34 EST 2007


On Wednesday 06 June 2007, Wade Farnsworth wrote:
> +
> +       np = of_find_compatible_node(NULL, NULL, "pnpPNP,b00");
> +       if (!np)
> +               return -ENODEV;
> +
> +       if (of_address_to_resource(np, 0, &res)) {
> +               of_node_put(np);
> +               return -ENODEV;
> +       }
> +
> +       pd = platform_device_register_simple("rtc_cmos", -1,
> +                                            &res, 1);

Doesn't this conflict with a potential isapnp driver for the same
device? If you have multiple isapnp devices, it may be better
to add a bus driver for the isapnp host, and use device drivers
for that bus instead of platform devices.

	Arnd <><


More information about the Linuxppc-dev mailing list