lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200805282327.08981.david-b@pacbell.net>
Date:	Wed, 28 May 2008 23:27:08 -0700
From:	David Brownell <david-b@...bell.net>
To:	Stas Sergeev <stsp@...et.ru>, akpm@...ux-foundation.org
Cc:	ambx1@....rr.com, bjorn.helgaas@...com, mingo@...e.hu,
	tglx@...utronix.de, Russell King <rmk+lkml@....linux.org.uk>,
	Linux kernel <linux-kernel@...r.kernel.org>
Subject: Re: [patch][resend] provide rtc_cmos platform device, take 2

On Tuesday 27 May 2008, Stas Sergeev wrote:
> --- a/arch/x86/kernel/rtc.c
> +++ b/arch/x86/kernel/rtc.c
> @@ -4,9 +4,12 @@
>  #include <linux/acpi.h>
>  #include <linux/bcd.h>
>  #include <linux/mc146818rtc.h>
> +#include <linux/platform_device.h>
> +#include <linux/pnp.h>
>  
>  #include <asm/time.h>
>  #include <asm/vsyscall.h>
> +#include <asm/mc146818rtc.h>

The <asm/mc146818rtc.h> isn't needed, since it's automatically
included via <linux/mc146818rtc.h> ... see right at the top.

And for good fun, notice how the asm file includes the linux
version ... seems like a cleanup would be nice someday.  :)


> --- a/drivers/rtc/rtc-cmos.c
> +++ b/drivers/rtc/rtc-cmos.c

> @@ -958,20 +946,33 @@ static struct platform_driver cmos_platform_driver = {
>  
>  static int __init cmos_init(void)
>  {
> +#ifdef CONFIG_PNP
> +       if (pnp_platform_devices)
> +               return pnp_register_driver(&cmos_pnp_driver);
> +       else
> +               return platform_driver_probe(&cmos_platform_driver,
> +                       cmos_platform_probe);
> +#else
>         return platform_driver_probe(&cmos_platform_driver,
>                         cmos_platform_probe);
> +#endif /* CONFIG_PNP */
>  }
>  module_init(cmos_init);

That's kind of ugly, but not wrong.

My only question is whether that resolves the problem Russell was 
reporting.  I think his situation needed to register *both* types
of bus glue (but I never saw his patch).  If we're going to fix this,
best merge just one patch...

- Dave


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ