Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754932AbdL2HQ2 (ORCPT ); Fri, 29 Dec 2017 02:16:28 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:39776 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbdL2HQ0 (ORCPT ); Fri, 29 Dec 2017 02:16:26 -0500 X-Google-Smtp-Source: ACJfBotbcKnwi85L6OW0EckUOfhd1PutaHOdH6oLUZBiTDlA9xlztFCoXwEw455saQ1/fJPZ/YDzfQ== From: Dmitry Mastykin Cc: Dmitry Mastykin , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Jacopo Mondi , Rob Herring , Dan Carpenter , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] iio: adc: max9611: fix module auto-loading Date: Fri, 29 Dec 2017 10:14:27 +0300 Message-Id: <1514531684-3872-1-git-send-email-mastichi@gmail.com> X-Mailer: git-send-email 2.7.4 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 937 Lines: 35 Module auto-load doesn't work because i2c table is not exported. Signed-off-by: Dmitry Mastykin --- 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); + 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