From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752352AbbLVFpU (ORCPT ); Tue, 22 Dec 2015 00:45:20 -0500 Received: from mail-pf0-f172.google.com ([209.85.192.172]:36750 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751473AbbLVFpR (ORCPT ); Tue, 22 Dec 2015 00:45:17 -0500 From: Caesar Wang To: broonie@kernel.org, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.or, heiko@sntech.de, bardliao@realtek.com, Caesar Wang Subject: [PATCH v2 1/2] ASoC: rt5616: add an of_match table Date: Tue, 22 Dec 2015 13:45:02 +0800 Message-Id: <1450763103-21073-1-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a device tree match table. This serves to make the driver's support of device tree more explicit. Signed-off-by: Caesar Wang --- Changes in v2: None Changes in v1: None sound/soc/codecs/rt5616.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c index f4005cb..e01a32d 100644 --- a/sound/soc/codecs/rt5616.c +++ b/sound/soc/codecs/rt5616.c @@ -1287,6 +1287,14 @@ static const struct i2c_device_id rt5616_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, rt5616_i2c_id); +#if defined(CONFIG_OF) +static const struct of_device_id rt5616_of_match[] = { + { .compatible = "realtek,rt5616", }, + {}, +}; +MODULE_DEVICE_TABLE(of, rt5616_of_match); +#endif + static int rt5616_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { @@ -1359,6 +1367,7 @@ static void rt5616_i2c_shutdown(struct i2c_client *client) static struct i2c_driver rt5616_i2c_driver = { .driver = { .name = "rt5616", + .of_match_table = of_match_ptr(rt5616_of_match), }, .probe = rt5616_i2c_probe, .remove = rt5616_i2c_remove, -- 1.9.1