From: "Pali Rohár" <pali.rohar@gmail.com>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Sebastian Reichel <sre@kernel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH 4/4] w1:slaves:bq27000: load battery driver kernel module if required
Date: Thu, 8 Oct 2015 00:26:21 +0200 [thread overview]
Message-ID: <201510080026.21233@pali> (raw)
In-Reply-To: <c9ee31c641a8612c49172123cd56407484e699d6.1444243358.git.hns@goldelico.com>
[-- Attachment #1: Type: Text/Plain, Size: 1421 bytes --]
On Wednesday 07 October 2015 20:42:39 H. Nikolaus Schaller wrote:
> 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 <hns@goldelico.com>
> ---
> 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;
Hi! Function platform_device_alloc would allocate kernel device and it
should also load appropriate kernel driver (via platform:bq27000-battery
alias). If that does not work, problem is somewhere else. Maybe depmod
is not properly generated? Or bq27x00_batter.ko modules does not contain
needed alias?
Adding request_module() here is not proper solution. Real problem is
somewhere else... Anyway there is series of patches for bq27x00_battery
which should cleanup some problems, so maybe they also fix your problem.
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2015-10-07 22:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 18:42 [PATCH 0/4] Fix minor bq27x00 displeasures H. Nikolaus Schaller
2015-10-07 18:42 ` [PATCH 1/4] restore bq27000 code of v4.3-rc4 H. Nikolaus Schaller
2015-10-07 18:43 ` H. Nikolaus Schaller
2015-10-07 18:42 ` [PATCH 2/4] restore w1 slave " H. Nikolaus Schaller
2015-10-07 18:44 ` H. Nikolaus Schaller
2015-10-07 18:42 ` [PATCH 3/4] power:bq27x00: don't fill system log by missing battery H. Nikolaus Schaller
2015-10-07 22:23 ` Pali Rohár
2015-10-07 22:50 ` Neil Brown
2015-12-05 0:38 ` Sebastian Reichel
2015-10-07 18:42 ` [PATCH 4/4] w1:slaves:bq27000: load battery driver kernel module if required H. Nikolaus Schaller
2015-10-07 22:26 ` Pali Rohár [this message]
2015-10-08 7:26 ` H. Nikolaus Schaller
2015-10-08 7:54 ` Pali Rohár
2015-10-08 9:58 ` H. Nikolaus Schaller
2015-10-07 18:45 ` [PATCH 0/4] Fix minor bq27x00 displeasures H. Nikolaus Schaller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201510080026.21233@pali \
--to=pali.rohar@gmail.com \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=hns@goldelico.com \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).