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: <201202221450.04390.arnd@arndb.de>
Date:	Wed, 22 Feb 2012 14:50:03 +0000
From:	Arnd Bergmann <arnd@...db.de>
To:	Nicolas Ferre <nicolas.ferre@...el.com>
Cc:	plagnioj@...osoft.com, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org, rmallon@...il.com,
	linux@....linux.org.uk
Subject: Re: [PATCH v2 12/19] ARM: at91/rtc-at91sam9: each SoC can select the RTT device to use

On Wednesday 22 February 2012, Nicolas Ferre wrote:
> From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>
> 
> For the RTT as RTC driver rtc-at91sam9, the platform_device structure
> is filled during SoC initialization. This will allow to convert this
> RTC driver as a standard platform driver.

Can you make this more elaborate? I don't see from this or the code why
you don't just always register the RTT as "rtc-at91sam9". There seems to
be no driver for the "at91_rtt" in tree, so I don't know if there is
an out of tree driver binding to it.

Would it be possible to remove the compile time #if and the resetting
of the device name if both drivers bind to the rtc name and the other
rtt driver binds to both names?
 
>  static int __init at91_rtc_init(void)
>  {
> -	int status;
> -	struct device *rtc;
> -
> -	status = platform_driver_register(&at91_rtc_driver);
> -	if (status)
> -		return status;
> -	rtc = bus_find_device(&platform_bus_type, NULL,
> -			NULL, at91_rtc_match);
> -	if (!rtc)
> -		platform_driver_unregister(&at91_rtc_driver);
> -	return rtc ? 0 : -ENODEV;
> +	return platform_driver_register(&at91_rtc_driver);
>  }
>  module_init(at91_rtc_init);

This can become module_platform_driver().

	Arnd
--
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