From: Shaohua Li <shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: "Yu, Luming" <luming.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: acpi-dev
<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
"Brown, Len" <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Dominik Brodowski <linux-JhLEnvuH02M@public.gmane.org>,
Adam Belay <ambx1-IBH0VoN/3vPQT0dZR+AlfA@public.gmane.org>
Subject: RE: [RFC]convert ACPI driver model to Linux driver model - takes 2
Date: Thu, 13 Oct 2005 16:20:59 +0800 [thread overview]
Message-ID: <1129191659.9987.11.camel@linux-hp.sh.intel.com> (raw)
In-Reply-To: <3ACA40606221794F80A5670F0AF15F84041AC20F@pdsmsx403>
On Thu, 2005-10-13 at 15:45 +0800, Yu, Luming wrote:
> >+static int __init acpi_phys_bus_init(void)
> >+{
> >+ bus_register(&acpi_phys_bus_type);
> >+
> >+ phys_root = kzalloc(sizeof(struct acpi_phys_device),
> >GFP_KERNEL);
> >+ if (!phys_root)
> >+ return -ENOMEM;
> >+
> >+ phys_root->acpi_dev = acpi_root;
> >+ phys_root->phys_dev.release = acpi_phys_device_release;
> >+ sprintf(phys_root->phys_dev.bus_id, "%s",
> >acpi_root->pnp.bus_id);
> >+ device_register(&phys_root->phys_dev);
> >+
> >+ /* enumerate devices */
> >+ acpi_bus_register_driver(&dummy_driver);
> >+ return 0;
> >+}
>
> The structure is in a mess. why not cut bus.c?
>
> I like this:
>
> acpi_bus_init(void)
> {
> ...
> bus_register(&acpi_bus_type);
> ...
> driver_register(&acpi_bus_driver);
> ...
> }
I'm sorry, but I don't understand what do you mean. Can you clarify it?
Also, please focus on the basic idea of how to convert ACPI driver model
in current stage. It appears people have quite different opinions about
the topic. The code is just to show my idea (a RFC) not for merging, so
please ignore possible errors (Not everybody agrees with introducing
ACPI bus, actually). It's my bad not explain this.
Thanks,
Shaohua
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
next prev parent reply other threads:[~2005-10-13 8:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-13 7:45 [RFC]convert ACPI driver model to Linux driver model - takes 2 Yu, Luming
2005-10-13 8:20 ` Shaohua Li [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-10-14 9:35 Li, Shaohua
2005-10-14 12:47 ` Matthew Wilcox
[not found] ` <20051014124749.GD16113-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
2005-10-18 1:30 ` Shaohua Li
[not found] ` <1129599034.3965.6.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org>
2005-10-18 17:32 ` Rajesh Shah
2005-10-14 15:54 ` Bjorn Helgaas
[not found] ` <200510140954.52206.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2005-10-18 3:06 ` Shaohua Li
2005-10-13 8:18 mika.penttila-9Aww8k/80nUxHbG02/KK1g
[not found] ` <20051013081837.PTGN24578.fep01-app.kolumbus.fi-7B1qVitd7rZYRdgNIgFt/t8DI8KqlI9s@public.gmane.org>
2005-10-13 8:32 ` Shaohua Li
2005-10-13 6:37 Shaohua Li
[not found] ` <1129185454.9074.15.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org>
2005-10-13 20:43 ` Bjorn Helgaas
[not found] ` <200510131443.47844.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2005-10-14 1:13 ` Shaohua Li
[not found] ` <1129252436.3948.12.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org>
2005-10-14 3:21 ` Bjorn Helgaas
2005-10-20 17:04 ` Bjorn Helgaas
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=1129191659.9987.11.camel@linux-hp.sh.intel.com \
--to=shaohua.li-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=ambx1-IBH0VoN/3vPQT0dZR+AlfA@public.gmane.org \
--cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-JhLEnvuH02M@public.gmane.org \
--cc=luming.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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