From patchwork Wed Oct 7 18:42:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 7346921 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6C6AFBEEA4 for ; Wed, 7 Oct 2015 18:42:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A3CD820638 for ; Wed, 7 Oct 2015 18:42:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E0D7F20626 for ; Wed, 7 Oct 2015 18:42:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752147AbbJGSms (ORCPT ); Wed, 7 Oct 2015 14:42:48 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.217]:33328 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753600AbbJGSmr (ORCPT ); Wed, 7 Oct 2015 14:42:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1444243364; l=742; s=domk; d=goldelico.com; h=References:In-Reply-To:References:In-Reply-To:Date:Subject:Cc:To: From; bh=VSLeBggZV0onV4OnIkicX1PSg9NppDqmFu7TtEEZMaU=; b=DUY7pBhURDdJXrvmk0km7El6BFmI4esAMujVFBZraQaA2eiI7oNYVxmpdTwbdpKHszm UsAWsdNuMbhz0q5Dnauq8LjWpbHazrn//1joaLxwtxFYfZNI01f77PstC9VBrXUgvXD7r HhWccMOAdZ/DkusTqLTVX4hUl/zJQ1/wvoA= X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcecEarQROEYabkiUo6mSAGQ+qKID8oIJRhBQ== X-RZG-CLASS-ID: mo00 Received: from localhost.localdomain (p57AE01D2.dip0.t-ipconnect.de [87.174.1.210]) by smtp.strato.de (RZmta 37.13 DYNA|AUTH) with ESMTPA id q02ab6r97Igh8Fk; Wed, 7 Oct 2015 20:42:43 +0200 (CEST) From: "H. Nikolaus Schaller" To: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse Cc: linux-pm@vger.kernel.org, "H. Nikolaus Schaller" Subject: [PATCH 4/4] w1:slaves:bq27000: load battery driver kernel module if required Date: Wed, 7 Oct 2015 20:42:39 +0200 Message-Id: X-Mailer: git-send-email 2.5.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Explicitly call request_module() in the wrapper so that the bq27x00_battery driver is loded on demand, when compiled as module. Signed-off-by: H. Nikolaus Schaller --- drivers/w1/slaves/w1_bq27000.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/w1/slaves/w1_bq27000.c b/drivers/w1/slaves/w1_bq27000.c index caafb17..745bd6e 100644 --- a/drivers/w1/slaves/w1_bq27000.c +++ b/drivers/w1/slaves/w1_bq27000.c @@ -49,6 +49,8 @@ static int w1_bq27000_add_slave(struct w1_slave *sl) int ret; struct platform_device *pdev; + request_module("bq27x00_battery"); /* load as module if needed */ + pdev = platform_device_alloc("bq27000-battery", -1); if (!pdev) { ret = -ENOMEM;