Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp41936imm; Thu, 20 Sep 2018 13:46:53 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYdtclE6X0OfzfkLW1lYggH0zwAtN4QNHBsFsZx0ONqJKcfIbn9R1up3yp4v5Wv/Twwbtr1 X-Received: by 2002:a63:7353:: with SMTP id d19-v6mr38080878pgn.281.1537476413318; Thu, 20 Sep 2018 13:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537476413; cv=none; d=google.com; s=arc-20160816; b=NtztCdsPYg8H7MbaJMD31DQfDNvWDwmADgQhwY7kKxk1Y4bX+uWq9Cno1+Ry4+gkXB nZ+PWji2hc0GEyNAn4662S2R9rNT96mEZewhJpr6V9ezdR6y5bxOKGpvIwgZpnHeB4Q7 G7b2zXgXp4wm8Of5noBXxiu8Pj4B2Aczitu10Ip5giRQGzxnWWB8Hy6HGEVKSX6s30to gu9j13QUW1rn0is/C8OyffPw0irEw5sz2VoKJz9td6liYi3wP74r+QJmkcXsf6XqBxYJ HsHrRGBOfsemdxxYokGaYaazqL+ISyQxMiWjpd6UU2dgLHKTvzV70OgPiVKEEfC/BQ5E KWMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=N/Wj/Ce31UHtgG56wu9+wBfD+B1MQY3nPhNgA+c5JMY=; b=nDcp3Z88W5rA1ykABYb7YOCF4ioGUpUoXJBDfGuVM2FZ65iQUEljh81bcj077gvLoJ xCox5SVB36tPUCk2whZn0K95lPHOCv+i8qcaZYYphFeCpXmboOi8A0s4F9nnxqSNfrUp Q669Du6SkLyFqNgwOu0FxZfplQubBJghxYLfYGrEbqO/DGfcXwpYdEEWj9+JZcUj5dau txTfBhw2STAFr3AbapblVTQTHW6jaezusltP26JNKJ/bXioEljzaJazZ0lOLDBbYOa6i x+pF1emJ5jas4jnXCjmKsst91p6R+SDWkINbEVLIt3FtyOpIzhSj9WPjdVjT/PZv03NG PRQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oE1IosRz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17-v6si23260667pgp.549.2018.09.20.13.46.37; Thu, 20 Sep 2018 13:46:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oE1IosRz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388479AbeIUCbP (ORCPT + 99 others); Thu, 20 Sep 2018 22:31:15 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:34549 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726128AbeIUCbP (ORCPT ); Thu, 20 Sep 2018 22:31:15 -0400 Received: by mail-lf1-f66.google.com with SMTP id c29-v6so9602599lfj.1; Thu, 20 Sep 2018 13:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=N/Wj/Ce31UHtgG56wu9+wBfD+B1MQY3nPhNgA+c5JMY=; b=oE1IosRz2+s9KG92zWkQA2apmFjzwcGSCogp7kTh/ZP1sYI0Dk1zPiFumrLy4xC/pX q38NYGJcxdQOyRk7J4QlgtA3qo3fbukf2TcQbZOZLpP17lf7LhvjUFDpI1mFwCylHIso onh3nHknK3Ef8jqpLPeKm+u26/9CFjkvEj197BzFFNZyfO5JJ1hgtnMjM/yDUCvGzsS+ FvBvnBpHgHGH/PECBULyxT3+lurWRMghMJyPTMgBKVyNC1Ifx0TRs6scgNc9KbSnsq8D e1CmQzsomQ3/xYfVRgimLCRc/ZxFy5pbSK/WLFXjuezHHZ3Of5mqTLmTXUdXhi8MBI+d qDng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=N/Wj/Ce31UHtgG56wu9+wBfD+B1MQY3nPhNgA+c5JMY=; b=atebnXJRT044GtfnmZY5hIaNmoxbhX48wQ6c6hFcshROUoOHIsMIP8lipc4+Jz748R 1EOuXfWNjrVLrJSzEkuYtJ6yimpFsuAWUraecv31F4Lji0Dr6yF4c5xiubiGv++OGnbv 6VNC6D4+nzGFUiFf7n8XHhY4crHfaIRJLzFYDtHz40fKGcjZsgGTVHns7SCimS/uK/zc mpUvaf/PxHw40oxC1UIiU4qPKIApEZPNVxnMOjHAKfkc1O+bz5kFdLS0co7XFGqi2WLb xTXOJ01m1xpjMNKmlSgPWzKy+R8KXVN66Fql1VZCrULvpVUAfzaybVOfuX0lQYxul3/b zRdg== X-Gm-Message-State: APzg51DX4kXufwHVRnKg7rwVl/uLF81DgDjHbMr3Ux9l7p8M2lk/7iSU 6p/eE5A/p+sPzk4tq9qYsnA= X-Received: by 2002:a19:7709:: with SMTP id s9-v6mr6418489lfc.84.1537476355412; Thu, 20 Sep 2018 13:45:55 -0700 (PDT) Received: from piling.lan (80-71-134-83.u.parknet.dk. [80.71.134.83]) by smtp.gmail.com with ESMTPSA id r23-v6sm4470355ljc.15.2018.09.20.13.45.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 13:45:54 -0700 (PDT) From: Ricardo Ribalda Delgado To: Pavel Machek , Sakari Ailus , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Verkuil , Laurent Pinchart Cc: Ricardo Ribalda Delgado Subject: [[PATCH v3] 3/6] [media] ad5820: Add support for of-autoload Date: Thu, 20 Sep 2018 22:45:37 +0200 Message-Id: <20180920204540.28832-3-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180920204540.28832-1-ricardo.ribalda@gmail.com> References: <20180920204540.28832-1-ricardo.ribalda@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since kernel 4.16, i2c devices with DT compatible tag are modprobed using their DT modalias. Without this patch, if this driver is build as module it would never be autoprobed. Signed-off-by: Ricardo Ribalda Delgado Acked-by: Pavel Machek --- drivers/media/i2c/ad5820.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820.c index 625867472929..e461d36201a4 100644 --- a/drivers/media/i2c/ad5820.c +++ b/drivers/media/i2c/ad5820.c @@ -372,12 +372,21 @@ static const struct i2c_device_id ad5820_id_table[] = { }; MODULE_DEVICE_TABLE(i2c, ad5820_id_table); +#ifdef CONFIG_OF +static const struct of_device_id ad5820_of_table[] = { + { .compatible = "adi,ad5820" }, + { } +}; +MODULE_DEVICE_TABLE(of, ad5820_of_table); +#endif + static SIMPLE_DEV_PM_OPS(ad5820_pm, ad5820_suspend, ad5820_resume); static struct i2c_driver ad5820_i2c_driver = { .driver = { .name = AD5820_NAME, .pm = &ad5820_pm, + .of_match_table = of_match_ptr(ad5820_of_table), }, .probe = ad5820_probe, .remove = ad5820_remove, -- 2.18.0