Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751333AbdFBIx3 (ORCPT ); Fri, 2 Jun 2017 04:53:29 -0400 Received: from mail-it0-f52.google.com ([209.85.214.52]:36032 "EHLO mail-it0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750813AbdFBIxZ (ORCPT ); Fri, 2 Jun 2017 04:53:25 -0400 From: Guodong Xu To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, xuwei5@hisilicon.com, catalin.marinas@arm.com, will.deacon@arm.com, lgirdwood@gmail.com, broonie@kernel.org, khilman@baylibre.com, arnd@arndb.de, gregory.clement@free-electrons.com, horms+renesas@verge.net.au, olof@lixom.net, thomas.petazzoni@free-electrons.com, yamada.masahiro@socionext.com, riku.voipio@linaro.org, treding@nvidia.com, krzk@kernel.org, eric@anholt.net, damm+renesas@opensource.se, ard.biesheuvel@linaro.org, linus.walleij@linaro.org, geert+renesas@glider.be Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, hw.wangxiaoyin@hisilicon.com, Guodong Xu , Jeremy Linton Subject: [PATCH v2 4/6] regulator: hi6421: Describe consumed platform device Date: Fri, 2 Jun 2017 16:51:15 +0800 Message-Id: <20170602085117.27474-5-guodong.xu@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170602085117.27474-1-guodong.xu@linaro.org> References: <20170602085117.27474-1-guodong.xu@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1033 Lines: 32 The hi6421-regulator driver consumes a similarly named platform device. Adding that to the module device table, allows modprobe to locate this driver once the device is created. Cc: Jeremy Linton Cc: Mark Brown Signed-off-by: Guodong Xu --- drivers/regulator/hi6421-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/regulator/hi6421-regulator.c b/drivers/regulator/hi6421-regulator.c index 62c5f54..259c3a8 100644 --- a/drivers/regulator/hi6421-regulator.c +++ b/drivers/regulator/hi6421-regulator.c @@ -621,7 +621,14 @@ static int hi6421_regulator_probe(struct platform_device *pdev) return 0; } +static const struct platform_device_id hi6421_regulator_table[] = { + { .name = "hi6421-regulator" }, + {}, +}; +MODULE_DEVICE_TABLE(platform, hi6421_regulator_table); + static struct platform_driver hi6421_regulator_driver = { + .id_table = hi6421_regulator_table, .driver = { .name = "hi6421-regulator", }, -- 2.10.2