From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754891Ab1CKQtc (ORCPT ); Fri, 11 Mar 2011 11:49:32 -0500 Received: from www.tglx.de ([62.245.132.106]:40746 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816Ab1CKQtb (ORCPT ); Fri, 11 Mar 2011 11:49:31 -0500 Date: Fri, 11 Mar 2011 17:49:24 +0100 (CET) From: Thomas Gleixner To: Sebastian Andrzej Siewior 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 In-Reply-To: <20110311152247.GA14273@www.tglx.de> Message-ID: References: <20110311152247.GA14273@www.tglx.de> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > #include > > +#include > #include > #include > #include > @@ -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 >