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]
Date:   Fri, 29 Dec 2017 10:11:23 +0100
From:   jacopo mondi <jacopo@...ndi.org>
To:     Dmitry Mastykin <mastichi@...il.com>
Cc:     Jonathan Cameron <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Jacopo Mondi <jacopo+renesas@...ndi.org>,
        Rob Herring <robh@...nel.org>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: adc: max9611: fix module auto-loading

Hi Dmitry,

On Fri, Dec 29, 2017 at 10:14:27AM +0300, Dmitry Mastykin wrote:
> Module auto-load doesn't work because i2c table is not exported.
>
> Signed-off-by: Dmitry Mastykin <mastichi@...il.com>
> ---
>  drivers/iio/adc/max9611.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/max9611.c b/drivers/iio/adc/max9611.c
> index b1dd17c..7924b5c 100644
> --- a/drivers/iio/adc/max9611.c
> +++ b/drivers/iio/adc/max9611.c
> @@ -516,13 +516,20 @@ static int max9611_init(struct max9611_dev *max9611)
>  	return 0;
>  }
>
> +static const struct i2c_device_id max9611_id[] = {
> +	{ "max9611", 0 },
> +	{ "max9612", 0 },
> +	{ },
> + };
> +MODULE_DEVICE_TABLE(i2c, max9611_id);
> +

Wouldn't you need to also set the "id_table" field of "struct
i2c_driver" to point this?

Thanks
   j


>  static const struct of_device_id max9611_of_table[] = {
>  	{.compatible = "maxim,max9611", .data = "max9611"},
>  	{.compatible = "maxim,max9612", .data = "max9612"},
>  	{ },
>  };
> -
>  MODULE_DEVICE_TABLE(of, max9611_of_table);
> +
>  static int max9611_probe(struct i2c_client *client,
>  			 const struct i2c_device_id *id)
>  {
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ