From patchwork Mon Jan 16 14:52:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 9518949 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7F867600C5 for ; Mon, 16 Jan 2017 14:52:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6693A2849C for ; Mon, 16 Jan 2017 14:52:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B4DF284CE; Mon, 16 Jan 2017 14:52:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2724B2849C for ; Mon, 16 Jan 2017 14:52:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751131AbdAPOwk (ORCPT ); Mon, 16 Jan 2017 09:52:40 -0500 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:58850 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750831AbdAPOwk (ORCPT ); Mon, 16 Jan 2017 09:52:40 -0500 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 83605A12FC; Mon, 16 Jan 2017 14:52:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osg.samsung.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (s-opensource.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jqvrkNsxVlMF; Mon, 16 Jan 2017 14:52:55 +0000 (UTC) Received: from minerva.localdomain (unknown [181.121.136.80]) by osg.samsung.com (Postfix) with ESMTPSA id AFD1EA0E75; Mon, 16 Jan 2017 14:52:52 +0000 (UTC) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Javier Martinez Canillas , linux-hwmon@vger.kernel.org, Jean Delvare , Guenter Roeck Subject: [PATCH] hwmon: (ltc4151) Export OF device ID table as module aliases Date: Mon, 16 Jan 2017 11:52:27 -0300 Message-Id: <1484578347-12352-1-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.7.4 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The I2C core always reports a MODALIAS of the form i2c: even if the device was registered via OF, this means that exporting the OF device ID table device aliases in the module is not needed. But in order to change how the core reports modaliases to user-space, it's better to export it. Before this patch: $ modinfo drivers/hwmon/ltc4151.ko | grep alias alias: i2c:ltc4151 After this patch: $ modinfo drivers/hwmon/ltc4151.ko | grep alias alias: i2c:ltc4151 alias: of:N*T*Clltc,ltc4151C* alias: of:N*T*Clltc,ltc4151 Signed-off-by: Javier Martinez Canillas --- drivers/hwmon/ltc4151.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwmon/ltc4151.c b/drivers/hwmon/ltc4151.c index 8445c9fd946b..b904cb547ffb 100644 --- a/drivers/hwmon/ltc4151.c +++ b/drivers/hwmon/ltc4151.c @@ -215,6 +215,7 @@ static const struct of_device_id ltc4151_match[] = { { .compatible = "lltc,ltc4151" }, {}, }; +MODULE_DEVICE_TABLE(of, ltc4151_match); /* This is the driver that will be inserted */ static struct i2c_driver ltc4151_driver = {