Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1450446 > unrolled thread

Re: [PATCH v3 1/4] hwmon: iio_hwmon: delay probing with late_initcall

Started byThomas Petazzoni <thomas.petazzoni@free-electrons.com>
First post2016-07-26 09:50 +0200
Last post2016-07-26 10:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 1/4] hwmon: iio_hwmon: delay probing with  late_initcall Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2016-07-26 09:50 +0200
    Re: [PATCH v3 1/4] hwmon: iio_hwmon: delay probing with late_initcall Quentin Schulz <quentin.schulz@free-electrons.com> - 2016-07-26 10:00 +0200

#1450446 — Re: [PATCH v3 1/4] hwmon: iio_hwmon: delay probing with late_initcall

FromThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date2016-07-26 09:50 +0200
SubjectRe: [PATCH v3 1/4] hwmon: iio_hwmon: delay probing with late_initcall
Message-ID<rZ5hL-7Cz-15@gated-at.bofh.it>
Hello,

On Tue, 26 Jul 2016 09:43:44 +0200, Quentin Schulz wrote:

> -module_platform_driver(iio_hwmon_driver);
> +static struct platform_driver * const drivers[] = {
> +	&iio_hwmon_driver,
> +};
> +
> +static int __init iio_hwmon_late_init(void)
> +{
> +	return platform_register_drivers(drivers, ARRAY_SIZE(drivers));

Why not platform_register_driver() ?

This would avoid the need to declare an array with just one entry.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[toc] | [next] | [standalone]


#1450457 — Re: [PATCH v3 1/4] hwmon: iio_hwmon: delay probing with late_initcall

FromQuentin Schulz <quentin.schulz@free-electrons.com>
Date2016-07-26 10:00 +0200
SubjectRe: [PATCH v3 1/4] hwmon: iio_hwmon: delay probing with late_initcall
Message-ID<rZ5rr-7Gb-5@gated-at.bofh.it>
In reply to#1450446
Hi,

On 26/07/2016 09:48, Thomas Petazzoni wrote:
> Hello,
> 
> On Tue, 26 Jul 2016 09:43:44 +0200, Quentin Schulz wrote:
> 
>> -module_platform_driver(iio_hwmon_driver);
>> +static struct platform_driver * const drivers[] = {
>> +	&iio_hwmon_driver,
>> +};
>> +
>> +static int __init iio_hwmon_late_init(void)
>> +{
>> +	return platform_register_drivers(drivers, ARRAY_SIZE(drivers));
> 
> Why not platform_register_driver() ?
> 
> This would avoid the need to declare an array with just one entry.

Actually, it is named platform_driver_register() as you just showed me
and that's the reason I didn't find it under platform_register_driver().

Thanks!

Quentin

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web