From: sniper <s3c24xx@gmail.com>
To: "Neshama Parhoti" <pneshama@gmail.com>
Cc: "Randy Dunlap" <randy.dunlap@oracle.com>,
"Adrian Bunk" <bunk@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: section mismatch with a platform driver
Date: Tue, 14 Oct 2008 04:22:48 +0800 [thread overview]
Message-ID: <9bd6b5360810131322k3d9a6f04h6abcfa6fcd8052f5@mail.gmail.com> (raw)
In-Reply-To: <912ec82a0810131158o316201a5o803cb46c67c1b065@mail.gmail.com>
There are some examples in kernel as following:
static struct platform_driver my_platform_driver = {
.probe = my_probe_func,
.remove = __devexit_p(my_remove),
.suspend = my_suspend,
.resume = my_resume,
.driver = {
.name = DRIVER_NAME,
},
};
static int __devinit my_probe_func(struct platform_device *pdev)
{
return 0;
}
note that my_platform_*driver*, it let this variable can refer to
init/exit sections.
You can find the explanation in /scripts/mod/modpost.c:
/* symbols in .data that may refer to init/exit sections */
static const char *symbol_white_list[] =
{
"*driver",
"*_template", /* scsi uses *_template a lot */
"*_timer", /* arm uses ops structures named _timer a lot */
"*_sht", /* scsi also used *_sht to some extent */
"*_ops",
"*_probe",
"*_probe_one",
"*_console",
NULL
};
On Tue, Oct 14, 2008 at 2:58 AM, Neshama Parhoti <pneshama@gmail.com> wrote:
> On Mon, Oct 13, 2008 at 6:31 PM, Randy Dunlap <randy.dunlap@oracle.com> wrote:
>>> Does that mean that all drivers with __init in their probe functions are bogus ?
>>
>> It depends. If your platform doesn't support hotplug, then it's possible
>> that the probe function is only called during system init, so it would be OK.
>
> Hmm any idea then why did it give me a section mismatch warning ?
>
> Thanks!!
> --
> 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/
>
prev parent reply other threads:[~2008-10-13 20:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-13 8:19 Neshama Parhoti
2008-10-13 8:51 ` Adrian Bunk
2008-10-13 9:28 ` Neshama Parhoti
2008-10-13 9:43 ` Gilad Ben-Yossef
2008-10-13 11:11 ` Neshama Parhoti
2008-10-13 9:50 ` Adrian Bunk
2008-10-13 11:13 ` Neshama Parhoti
2008-10-13 16:01 ` Randy Dunlap
2008-10-13 16:29 ` Neshama Parhoti
2008-10-13 16:31 ` Randy Dunlap
2008-10-13 18:58 ` Neshama Parhoti
2008-10-13 19:00 ` Randy Dunlap
2008-10-13 20:22 ` sniper [this message]
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=9bd6b5360810131322k3d9a6f04h6abcfa6fcd8052f5@mail.gmail.com \
--to=s3c24xx@gmail.com \
--cc=bunk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pneshama@gmail.com \
--cc=randy.dunlap@oracle.com \
/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
all inboxes | Powered by JetHome®