From: Thomas Gleixner <tglx@linutronix.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org, sodaville@linutronix.de
Subject: Re: [PATCH] x86/ce4100: set pci ops via callback instead of module init
Date: Fri, 11 Mar 2011 17:49:24 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.00.1103111747460.2787@localhost6.localdomain6> (raw)
In-Reply-To: <20110311152247.GA14273@www.tglx.de>
On Fri, 11 Mar 2011, Sebastian Andrzej Siewior wrote:
>
> struct sim_reg {
> @@ -306,10 +307,8 @@ struct pci_raw_ops ce4100_pci_conf = {
> .write = ce4100_conf_write,
> };
>
> -static int __init ce4100_pci_init(void)
Why don't you keep the function name and make it non static, add the
call to pci_legacy_init() and just set the init.pci pointer to this?
So all pci is stuff is where it belongs
Thanks,
tglx
> +void __init ce4100_init_pci_ops(void)
> {
> init_sim_regs();
> raw_pci_ops = &ce4100_pci_conf;
> - return 0;
> }
> -subsys_initcall(ce4100_pci_init);
> diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c
> index 68c0dbc..93b4e3c 100644
> --- a/arch/x86/platform/ce4100/ce4100.c
> +++ b/arch/x86/platform/ce4100/ce4100.c
> @@ -15,6 +15,7 @@
> #include <linux/serial_reg.h>
> #include <linux/serial_8250.h>
>
> +#include <asm/ce4100.h>
> #include <asm/prom.h>
> #include <asm/setup.h>
> #include <asm/i8259.h>
> @@ -125,6 +126,13 @@ static void __cpuinit sdv_pci_init(void)
> }
> #endif
>
> +static int __cpuinit ce4100_pci_init(void)
> +{
> + ce4100_init_pci_ops();
> + pci_legacy_init();
> + return 0;
> +}
> +
> /*
> * CE4100 specific x86_init function overrides and early setup
> * calls.
> @@ -136,6 +144,7 @@ void __init x86_ce4100_early_setup(void)
> x86_init.resources.probe_roms = x86_init_noop;
> x86_init.mpparse.get_smp_config = x86_init_uint_noop;
> x86_init.mpparse.find_smp_config = x86_init_noop;
> + x86_init.pci.init = ce4100_pci_init;
>
> #ifdef CONFIG_X86_IO_APIC
> x86_init.pci.init_irq = sdv_pci_init;
> --
> 1.7.4
>
next prev parent reply other threads:[~2011-03-11 16:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 15:22 Sebastian Andrzej Siewior
2011-03-11 16:49 ` Thomas Gleixner [this message]
2011-03-12 21:08 ` [PATCH v2] " Sebastian Andrzej Siewior
2011-03-14 9:33 ` [PATCH v2 current] " Sebastian Andrzej Siewior
2011-03-14 14:16 ` [tip:x86/urgent] x86: ce4100: Set " tip-bot for Sebastian Andrzej Siewior
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=alpine.LFD.2.00.1103111747460.2787@localhost6.localdomain6 \
--to=tglx@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sodaville@linutronix.de \
--cc=x86@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
all inboxes | Powered by JetHome®