View | Details | Raw Unified | Return to bug 11580 | Differences between
and this patch

Collapse All | Expand All

(-)rtc-cmos.c_patched (-27 / +25 lines)
Lines 935-976 Link Here
935
MODULE_ALIAS("platform:rtc_cmos");
935
MODULE_ALIAS("platform:rtc_cmos");
936
936
937
static struct platform_driver cmos_platform_driver = {
937
static struct platform_driver cmos_platform_driver = {
938
        .remove         = __exit_p(cmos_platform_remove),
938
	.remove		= __exit_p(cmos_platform_remove),
939
        .shutdown       = cmos_platform_shutdown,
939
	.shutdown	= cmos_platform_shutdown,
940
        .driver = {
940
	.driver = {
941
                .name           = (char *) driver_name,
941
		.name		= (char *) driver_name,
942
                .suspend        = cmos_suspend,
942
		.suspend	= cmos_suspend,
943
                .resume         = cmos_resume,
943
		.resume		= cmos_resume,
944
        }
944
	}
945
};
945
};
946
946
947
static int __init cmos_init(void)
947
static int __init cmos_init(void)
948
{
948
{
949
        int retval = 0;
949
#ifdef	CONFIG_PNP
950
950
	if (pnp_platform_devices)
951
#ifdef  CONFIG_PNP
951
		return pnp_register_driver(&cmos_pnp_driver);
952
        pnp_register_driver(&cmos_pnp_driver);
952
	else
953
#endif
953
		return platform_driver_probe(&cmos_platform_driver,
954
954
			cmos_platform_probe);
955
        if (!cmos_rtc.dev)
955
#else
956
                retval = platform_driver_probe(&cmos_platform_driver,
956
	return platform_driver_probe(&cmos_platform_driver,
957
                                                cmos_platform_probe);
957
			cmos_platform_probe);
958
958
#endif /* CONFIG_PNP */
959
        if (retval == 0)
960
                return 0;
961
962
#ifdef CONFIG_PNP
963
        pnp_unregister_driver(&cmos_pnp_driver);
964
#endif
965
        return retval;
966
}
959
}
967
module_init(cmos_init);
960
module_init(cmos_init);
968
961
969
static void __exit cmos_exit(void)
962
static void __exit cmos_exit(void)
970
{
963
{
971
#ifdef  CONFIG_PNP
964
#ifdef	CONFIG_PNP
972
        pnp_unregister_driver(&cmos_pnp_driver);
965
	if (pnp_platform_devices)
973
#endif
966
		pnp_unregister_driver(&cmos_pnp_driver);
967
	else
968
		platform_driver_unregister(&cmos_platform_driver);
969
#else
970
	platform_driver_unregister(&cmos_platform_driver);
971
#endif /* CONFIG_PNP */
974
}
972
}
975
module_exit(cmos_exit);
973
module_exit(cmos_exit);
976
974

Return to bug 11580