Received: by 10.213.65.68 with SMTP id h4csp1797450imn; Mon, 19 Mar 2018 13:32:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELuw0hgPh0PcugIjX2o9MNNr2wg2TgxqCHXd1g1W0Quogj07IQQGL/XgG7zON+WnsU11bLVL X-Received: by 2002:a17:902:51c3:: with SMTP id y61-v6mr5814849plh.355.1521491537338; Mon, 19 Mar 2018 13:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521491537; cv=none; d=google.com; s=arc-20160816; b=Wb5lqR7aeRdTvcsfVY+4iWulWBPYIuc1ys+KZofco5Mc5E1Qq1vT2NUbcwlP3E0SVu i2Yhhc/GqhzzZg5nsj4jnOl0z0k/T6V+plQTBFROpmwLETeZQPH3LFB+fiIu/OWMwl2c jRfsyyv1oe+wOkPdgCC2O5UZQVCJQ+m8WsHjttbWojpa30c1I/BDh8GbMGkwaS6pXPus SI4EldrR6cmhkgUmd/zheen/a5u9YGYdBqeLSaihokj71Lf/1+v5EAuIXV4Mt5fNpymE /WY01uZfAdtqbuv8pgPHbCfYdhwWUQRAvVfxsKxgYoOlfIaeq6cdlC9FVrjJrzVa6LiW z76g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=6xqiEyej/P7EW/cv1IxLFPhC4gDMLERZ6KBXcyJV4QY=; b=jDGQck7YzO0rrDkjaBEuiOvdZ/gdZUSJPVcvZkwkaGn6V/LxP+J9cp7AwN3OnmhRgT tle630eRDpVtaSfNEWzG2/VfK4T7970NFAgY4lCdJhitlpop6PEz6BUgvlXk8++hMmSF Q0LFw1e7qOA6yOR3pKr4pc3fgjnaf5LKR3tJch4V00NnaDSbV27eT0COMKOnuXMiqgIZ jF5A5rgfZxTCJ/se8HBVro4oGcv0UOWN4Fvusln9k/IFcy35LrjUlSbABVH+lxqpTBLq YyGnmoxX7DW98DPCWR7ra7fNYprAvnw+K3TT+ZZ7mcEotdM/9dOlCD83WxHnxlTNQgXA 9e+Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i21si29223pfj.208.2018.03.19.13.32.01; Mon, 19 Mar 2018 13:32:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S971343AbeCSUaF (ORCPT + 99 others); Mon, 19 Mar 2018 16:30:05 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42990 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030494AbeCSSNC (ORCPT ); Mon, 19 Mar 2018 14:13:02 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3D92311D6; Mon, 19 Mar 2018 18:13:02 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Javier Martinez Canillas , Dmitry Torokhov , Sasha Levin Subject: [PATCH 4.4 029/134] Input: qt1070 - add OF device ID table Date: Mon, 19 Mar 2018 19:05:12 +0100 Message-Id: <20180319171853.422990742@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319171849.024066323@linuxfoundation.org> References: <20180319171849.024066323@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Javier Martinez Canillas [ Upstream commit cf5cd9d4480a87da78768718cac194a71079b5cb ] The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. The compatible strings don't have a vendor prefix because that's how it's used currently, and changing this will be a Device Tree ABI break. Signed-off-by: Javier Martinez Canillas Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/input/keyboard/qt1070.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/drivers/input/keyboard/qt1070.c +++ b/drivers/input/keyboard/qt1070.c @@ -274,9 +274,18 @@ static const struct i2c_device_id qt1070 }; MODULE_DEVICE_TABLE(i2c, qt1070_id); +#ifdef CONFIG_OF +static const struct of_device_id qt1070_of_match[] = { + { .compatible = "qt1070", }, + { }, +}; +MODULE_DEVICE_TABLE(of, qt1070_of_match); +#endif + static struct i2c_driver qt1070_driver = { .driver = { .name = "qt1070", + .of_match_table = of_match_ptr(qt1070_of_match), .pm = &qt1070_pm_ops, }, .id_table = qt1070_id,