Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966798AbbBDWPI (ORCPT ); Wed, 4 Feb 2015 17:15:08 -0500 Received: from mail-we0-f179.google.com ([74.125.82.179]:42456 "EHLO mail-we0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966688AbbBDWPC (ORCPT ); Wed, 4 Feb 2015 17:15:02 -0500 From: Marek Belisko To: sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org Cc: mark.rutland@arm.com, tony@atomide.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, hns@goldelico.com, gta04-owner@goldelico.com, Marek Belisko Subject: [PATCH v3 5/6] power: twl4030_madc_battery: Add of_twl4030_madc_match to MODULE_DEVICE_TABLE Date: Wed, 4 Feb 2015 23:14:34 +0100 Message-Id: <1423088075-10025-6-git-send-email-marek@goldelico.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423088075-10025-1-git-send-email-marek@goldelico.com> References: <1423088075-10025-1-git-send-email-marek@goldelico.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1022 Lines: 30 When twl_4030_madc_battery is build as module, MODULE_DEVICE_TABLE allow the module to be auto-loaded since the module will match the devices instantiated from device tree. Signed-off-by: Marek Belisko --- drivers/power/twl4030_madc_battery.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/power/twl4030_madc_battery.c b/drivers/power/twl4030_madc_battery.c index ec14bc6..e6075ae 100644 --- a/drivers/power/twl4030_madc_battery.c +++ b/drivers/power/twl4030_madc_battery.c @@ -252,6 +252,8 @@ static const struct of_device_id of_twl4030_madc_match[] = { {}, }; +MODULE_DEVICE_TABLE(of, of_twl4030_madc_match); + #else static struct twl4030_madc_bat_platform_data * twl4030_madc_dt_probe(struct platform_device *pdev) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/