From patchwork Wed Jun 7 10:32:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo i Serra X-Patchwork-Id: 9771251 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 23EF96034B for ; Wed, 7 Jun 2017 10:33:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2B53268AE for ; Wed, 7 Jun 2017 10:33:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E762E28471; Wed, 7 Jun 2017 10:33:53 +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, UNPARSEABLE_RELAY 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 A7372268AE for ; Wed, 7 Jun 2017 10:33:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751697AbdFGKdk (ORCPT ); Wed, 7 Jun 2017 06:33:40 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:39199 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbdFGKc7 (ORCPT ); Wed, 7 Jun 2017 06:32:59 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 9270026B898 From: Enric Balletbo i Serra To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-input@vger.kernel.org Cc: Dmitry Torokhov , Lee Jones , Daniel Thompson , Jingoo Han , Richard Purdie , Jacek Anaszewski , Pavel Machek , Rob Herring , Mark Rutland , Russell King , Tony Lindgren , javier@dowhile0.org Subject: [PATCH 3/4] regulator: tps65217: Fix module autoload for devices registered via OF Date: Wed, 7 Jun 2017 12:32:41 +0200 Message-Id: <20170607103242.16008-3-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170607103242.16008-1-enric.balletbo@collabora.com> References: <20170607103242.16008-1-enric.balletbo@collabora.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The driver doesn't have a OF device ID table and so if devices are registered via OF, module autoloading won't work. Signed-off-by: Enric Balletbo i Serra --- drivers/regulator/tps65217-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c index 5324dc9..2c05360 100644 --- a/drivers/regulator/tps65217-regulator.c +++ b/drivers/regulator/tps65217-regulator.c @@ -263,9 +263,16 @@ static int tps65217_regulator_probe(struct platform_device *pdev) return 0; } +static const struct of_device_id tps65217_regulator_match_table[] = { + { .compatible = "ti,tps65217-pmic", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, tps65217_regulator_match_table); + static struct platform_driver tps65217_regulator_driver = { .driver = { .name = "tps65217-pmic", + .of_match_table = tps65217_regulator_match_table, }, .probe = tps65217_regulator_probe, };