LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: SDRAM failures on MPC5200B (Xia Yu)
From: 夏雨 @ 2007-07-21  1:48 UTC (permalink / raw)
  To: lokowich; +Cc: linuxppc-embedded
In-Reply-To: <mailman.1484.1184968961.8639.linuxppc-embedded@ozlabs.org>

Hi! According to the MPC5200B user's manual, you should define the S-delay
register(MBAR + 0x0190) to 0x04 ,and the initialization sequence of the DDR
should be modified according to the data sheet from MICRON. I have rewrite
the function as below:
static void sdram_start (int hi_addr)
{
	long hi_addr_bit = hi_addr ? 0x01000000 : 0;

	/* unlock mode register */
	*(vu_long *)MPC5XXX_SDRAM_CTRL = (SDRAM_CONTROL & 0xefffffff)|
0x80000000 | hi_addr_bit;
	__asm__ volatile ("sync");

	/* precharge all banks */
	*(vu_long *)MPC5XXX_SDRAM_CTRL = (SDRAM_CONTROL & 0xefffffff)|
0x80000002 | hi_addr_bit;
	__asm__ volatile ("sync");

#if SDRAM_DDR
	/* set mode register: extended mode */
	*(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_EMODE;
	__asm__ volatile ("sync");

	/* set mode register: reset DLL */
	*(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_MODE | 0x04000000;
	__asm__ volatile ("sync");
#endif

	/* precharge all banks */
	*(vu_long *)MPC5XXX_SDRAM_CTRL = (SDRAM_CONTROL & 0xefffffff) |
0x80000002 | hi_addr_bit;
	__asm__ volatile ("sync");

	/* auto refresh */
	*(vu_long *)MPC5XXX_SDRAM_CTRL = (SDRAM_CONTROL & 0xefffffff) |
0x80000004 | hi_addr_bit;
	__asm__ volatile ("sync");
	
	/* auto refresh */
	*(vu_long *)MPC5XXX_SDRAM_CTRL = (SDRAM_CONTROL & 0xefffffff) |
0x80000004 | hi_addr_bit;
	__asm__ volatile ("sync");
	
	/* set mode register */
	*(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_MODE;
	__asm__ volatile ("sync");

	/* normal operation */
	*(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | hi_addr_bit;
	__asm__ volatile ("sync");
	
	udelay(3); //delay 400clks;

}

Hope to be helpful!

^ permalink raw reply

* Re: [ofa-general] [PATCH 1/5] ehca: Supports large page MRs
From: Roland Dreier @ 2007-07-21  4:07 UTC (permalink / raw)
  To: Hoang-Nam Nguyen
  Cc: linuxppc-dev, fenkes, stefan.roscher, linux-kernel,
	openib-general
In-Reply-To: <200707201601.52277.hnguyen@linux.vnet.ibm.com>

I applied this, but I agree with checkpatch.pl:

 > WARNING: externs should be avoided in .c files
 > #227: FILE: drivers/infiniband/hw/ehca/ehca_mrmw.c:67:
 > +extern int ehca_mr_largepage;
 > 
 > WARNING: externs should be avoided in .c files
 > #949: FILE: drivers/infiniband/hw/ehca/hcp_if.c:753:
 > +	extern int ehca_debug_level;

if you need to use a variable in more than one .c file, put the extern
declaration in a common header that's included everywhere you use the
variable, including the .c file that it is defined in.  That way the
compiler can see if you get confused about the type of the variable.

When you get a chance, please post a follow-on patch to fix this.

 - R.

^ permalink raw reply

* Re: [PATCH 2/5] ehca: Generate event when SRQ limit reached
From: Roland Dreier @ 2007-07-21  4:12 UTC (permalink / raw)
  To: Hoang-Nam Nguyen
  Cc: fenkes, linux-kernel, openib-general, linuxppc-dev, raisch,
	stefan.roscher
In-Reply-To: <200707201602.19142.hnguyen@linux.vnet.ibm.com>

thanks, applied.

BTW, does your SRQ-capable hardware support generating the "last WQE
reached" event?  There's not any reliable way to avoid problems when
destroying QPs attached to an SRQ without it, and the IB spec requires
CAs that support SRQs to generate it (o11-5.2.5 in chapter 11 of vol 1).

I don't see any code in ehca to generate the event, and IPoIB CM at
least will be very unhappy when using SRQs if the event is not
generated.

 - R.

^ permalink raw reply

* Re: [PATCH 3/5] ehca: Make ehca2ib_return_code() non-inline
From: Roland Dreier @ 2007-07-21  4:14 UTC (permalink / raw)
  To: Hoang-Nam Nguyen
  Cc: fenkes, linux-kernel, openib-general, linuxppc-dev, raisch,
	stefan.roscher
In-Reply-To: <200707201602.46415.hnguyen@linux.vnet.ibm.com>

thanks, applied

^ permalink raw reply

* Re: [ofa-general] [PATCH 5/5] ehca: Support small QP queues
From: Roland Dreier @ 2007-07-21  4:20 UTC (permalink / raw)
  To: Hoang-Nam Nguyen
  Cc: linuxppc-dev, fenkes, stefan.roscher, linux-kernel,
	openib-general
In-Reply-To: <200707201604.17991.hnguyen@linux.vnet.ibm.com>

thanks, applied.  I fixed this up myself to work with commit 20c2df83,
which got rid of the destructor argument to kmem_cache_create() -- you
probably want to check my tree to make sure it's OK.

Also the same as I said before about checkpatch.pl's warning:

WARNING: externs should be avoided in .c files
#337: FILE: drivers/infiniband/hw/ehca/ehca_pd.c:91:
+	extern struct kmem_cache *small_qp_cache;

please fix that up when you get a chance

^ permalink raw reply

* Re: [ofa-general] [PATCH 1/5] ehca: Supports large page MRs
From: Hoang-Nam Nguyen @ 2007-07-21  8:22 UTC (permalink / raw)
  To: Roland Dreier
  Cc: Joachim Fenkes, linux-kernel, openib-general, linuxppc-dev,
	general-bounces, Hoang-Nam Nguyen, Stefan Roscher
In-Reply-To: <adabqe67632.fsf@cisco.com>

Hi Roland!
> I applied this, but I agree with checkpatch.pl:
>
>  > WARNING: externs should be avoided in .c files
>  > #227: FILE: drivers/infiniband/hw/ehca/ehca_mrmw.c:67:
>  > +extern int ehca_mr_largepage;
>  >
>  > WARNING: externs should be avoided in .c files
>  > #949: FILE: drivers/infiniband/hw/ehca/hcp_if.c:753:
>  > +   extern int ehca_debug_level;
>
> if you need to use a variable in more than one .c file, put the extern
> declaration in a common header that's included everywhere you use the
> variable, including the .c file that it is defined in.  That way the
> compiler can see if you get confused about the type of the variable.
That's true.
> When you get a chance, please post a follow-on patch to fix this.
Sure thing. Will do that for rc2.
Thanks!
Nam

^ permalink raw reply

* Re: [patch 1/3] m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible
From: Geert Uytterhoeven @ 2007-07-21  8:27 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-m68k, linux-kernel, Adrian Bunk, linuxppc-dev, linux-input,
	Andrew Morton
In-Reply-To: <d120d5000707201151q433f1f3eteb479109291a54bd@mail.gmail.com>

On Fri, 20 Jul 2007, Dmitry Torokhov wrote:
> On 7/20/07, Adrian Bunk <bunk@stusta.de> wrote:
> > On Fri, Jul 20, 2007 at 01:47:36PM -0400, Dmitry Torokhov wrote:
> > > On 7/20/07, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > >> From: Geert Uytterhoeven <geert@linux-m68k.org>
> > >>
> > >> m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible
> > >>
> > >> drivers/char/keyboard.c: In function 'kbd_keycode':
> > >> drivers/char/keyboard.c:1142: error: implicit declaration of function
> > >> 'mac_hid_mouse_emulate_buttons'
> > >>
> > >> The forward declaration of mac_hid_mouse_emulate_buttons() is not visible
> > >> on
> > >> m68k because it's hidden in the middle of a big #ifdef block.
> > >>
> > >> Move it to <linux/hid.h>, correct the type of the second parameter, and
> > >> include <linux/hid.h> where needed.
> > >
> > > linux/hid.h contains definitions needed for drivers speaking HID
> > > protocol, I don't think we want to put quirks for legacy keyboard
> > > driver there. I'd just move the #ifdef within drivers/char/keyboard.c
> > > for now.
> > >...
> > 
> > If you only move it you will keep the bug of the wrong second parameter.
> > 
> > But if you move it to any header file gcc is able to figure out such
> > errors itself instead of them being nasty runtime errors.
> > 
> > Such prototypes in C files are really bad since (like in this case) they
> > prevent the finding of bugs. It doesn't matter which header file you put
> > the prototype into (it can even be a new one), but it belongs into a
> > header file.
> > 
> 
> I am OK with adding a new header file. I was just saying that placing
> that declaration in linux/hid.h makes about the same sense as putting
> it into linux/scsi.h

At first I just wanted to move it. Then I thought about the angry
comments I would get about not moving it to a header file ;-)

<linux/hid.h> looked like the best candidate. <linux/kbd_kern.h> is
another option.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply

* Re: [RFC 0/1] lro: Generic Large Receive Offload for TCP traffic
From: Andrew Gallatin @ 2007-07-21 14:03 UTC (permalink / raw)
  To: Jan-Bernd Themann
  Cc: Thomas Klein, Jeff Garzik, Jan-Bernd Themann, netdev,
	linux-kernel, linux-ppc, Christoph Raisch, Marcus Eder,
	Stefan Roscher, David Miller
In-Reply-To: <200707201741.45079.ossthema@de.ibm.com>

On 7/20/07, Jan-Bernd Themann <ossthema@de.ibm.com> wrote:
> Hi,
>
> Thanks a lot for your comments so far.
> This generic LRO patch differs from the last one in several points.
> A new interface for a "receive in pages" mode has been added and tested
> with an eHEA prototype. Seems to work well.
>
> Does this extended interface seem to be sufficient?

Thank you for this!

At least for me, I find it is best to try to use an interface rather
than simply reading a diff.  So I will port Myri10GE to use the new
interface so that I can give better feedback,  I'll try my best to do
this  by early next week.

Thank you again,

Drew

^ permalink raw reply

* Someone broke my allmodconfig build
From: Stephen Rothwell @ 2007-07-21 14:12 UTC (permalink / raw)
  To: ppc-dev

[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]

Hi all,

At the end of a powerpc allmodconfig build, I get this (after the header
checks):

  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
strip -s -R .comment vmlinux -o vmlinux.strip
strip -s -R .comment vmlinux -o arch/powerpc/boot/zImage.iseries
  WRAP    arch/powerpc/boot/zImage.pseries
  WRAP    arch/powerpc/boot/zImage.pmac
  WRAP    arch/powerpc/boot/zImage.ps3
/home/sfr/kernels/linus/arch/powerpc/boot/wrapper: line 113: dtc: command not found
make[2]: *** [arch/powerpc/boot/zImage.ps3] Error 1
make[2]: *** Waiting for unfinished jobs....
  Building modules, stage 2.
make[1]: *** [zImage] Error 2
make[1]: *** Waiting for unfinished jobs....
  MODPOST 1794 modules
ERROR: "pmu_batteries" [drivers/power/pmu_battery.ko] undefined!
ERROR: "pmu_battery_count" [drivers/power/pmu_battery.ko] undefined!
ERROR: "pmu_power_flags" [drivers/power/pmu_battery.ko] undefined!
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make: *** [_all] Error 2

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* [PATCH] constify of_platform_driver name
From: Stephen Rothwell @ 2007-07-21 14:23 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, wli, ppc-dev, paulus, sparclinux, David S. Miller


Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/pcmcia/m8xx_pcmcia.c |    2 +-
 include/linux/of_platform.h  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Built for PowerPC allmodconfig and ppc64_defconfig, and for Sparc and
Sparc64 defconfig.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c
index 3c45142..b019854 100644
--- a/drivers/pcmcia/m8xx_pcmcia.c
+++ b/drivers/pcmcia/m8xx_pcmcia.c
@@ -1316,7 +1316,7 @@ static struct of_device_id m8xx_pcmcia_match[] = {
 MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match);
 
 static struct of_platform_driver m8xx_pcmcia_driver = {
-	.name = (char *)driver_name,
+	.name = driver_name,
 	.match_table = m8xx_pcmcia_match,
 	.probe = m8xx_probe,
 	.remove = m8xx_remove,
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 5fd44e6..22c3837 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -31,7 +31,7 @@ extern struct bus_type of_platform_bus_type;
  */
 struct of_platform_driver
 {
-	char			*name;
+	const char		*name;
 	struct of_device_id	*match_table;
 	struct module		*owner;
 
-- 
1.5.2.3

^ permalink raw reply related

* [PATCH] [POWERPC] hvcs: make some things static and const
From: Stephen Rothwell @ 2007-07-21 14:25 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev


Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/char/hvcs.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Built for PowerPC allmodconfig and ppc64_defconfig.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c
index 17f96e0..69d8866 100644
--- a/drivers/char/hvcs.c
+++ b/drivers/char/hvcs.c
@@ -210,9 +210,9 @@ static struct ktermios hvcs_tty_termios = {
 static int hvcs_parm_num_devs = -1;
 module_param(hvcs_parm_num_devs, int, 0);
 
-char hvcs_driver_name[] = "hvcs";
-char hvcs_device_node[] = "hvcs";
-char hvcs_driver_string[]
+static const char hvcs_driver_name[] = "hvcs";
+static const char hvcs_device_node[] = "hvcs";
+static const char hvcs_driver_string[]
 	= "IBM hvcs (Hypervisor Virtual Console Server) Driver";
 
 /* Status of partner info rescan triggered via sysfs. */
@@ -1092,7 +1092,7 @@ static int hvcs_enable_device(struct hvcs_struct *hvcsd, uint32_t unit_address,
  * NOTICE: Do NOT hold either the hvcs_struct.lock or hvcs_structs_lock when
  * calling this function or you will get deadlock.
  */
-struct hvcs_struct *hvcs_get_by_index(int index)
+static struct hvcs_struct *hvcs_get_by_index(int index)
 {
 	struct hvcs_struct *hvcsd = NULL;
 	unsigned long flags;
-- 
1.5.2.3

^ permalink raw reply related

* [PATCH] constify of_platform_driver match_table
From: Stephen Rothwell @ 2007-07-21 14:27 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, wli, ppc-dev, paulus, sparclinux, David S. Miller


Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/linux/of_platform.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Built for PowerPC allmodconfig and ppc64_defconfig and Sparc and Sparc64
defconfig.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 22c3837..448f70b 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -32,7 +32,7 @@ extern struct bus_type of_platform_bus_type;
 struct of_platform_driver
 {
 	const char		*name;
-	struct of_device_id	*match_table;
+	const struct of_device_id	*match_table;
 	struct module		*owner;
 
 	int	(*probe)(struct of_device* dev,
-- 
1.5.2.3

^ permalink raw reply related

* [PATCH] Fix tas_suspend/resume build warning
From: Stephen Rothwell @ 2007-07-21 14:29 UTC (permalink / raw)
  To: johannes; +Cc: linuxppc-dev, alsa-devel, Andrew Morton


sound/aoa/codecs/snd-aoa-codec-tas.c:750: warning: 'tas_suspend' defined but not used
sound/aoa/codecs/snd-aoa-codec-tas.c:760: warning: 'tas_resume' defined but not used

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 sound/aoa/codecs/snd-aoa-codec-tas.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c
index 2f771f5..3cbfe46 100644
--- a/sound/aoa/codecs/snd-aoa-codec-tas.c
+++ b/sound/aoa/codecs/snd-aoa-codec-tas.c
@@ -743,6 +743,7 @@ static int tas_switch_clock(struct codec_info_item *cii, enum clock_switch clock
 	return 0;
 }
 
+#ifdef CONFIG_PM
 /* we are controlled via i2c and assume that is always up
  * If that wasn't the case, we'd have to suspend once
  * our i2c device is suspended, and then take note of that! */
@@ -768,7 +769,6 @@ static int tas_resume(struct tas *tas)
 	return 0;
 }
 
-#ifdef CONFIG_PM
 static int _tas_suspend(struct codec_info_item *cii, pm_message_t state)
 {
 	return tas_suspend(cii->codec_data);
@@ -778,7 +778,10 @@ static int _tas_resume(struct codec_info_item *cii)
 {
 	return tas_resume(cii->codec_data);
 }
-#endif
+#else /* CONFIG_PM */
+#define _tas_suspend	NULL
+#define _tas_resume	NULL
+#endif /* CONFIG_PM */
 
 static struct codec_info tas_codec_info = {
 	.transfers = tas_transfers,
@@ -791,10 +794,8 @@ static struct codec_info tas_codec_info = {
 	.owner = THIS_MODULE,
 	.usable = tas_usable,
 	.switch_clock = tas_switch_clock,
-#ifdef CONFIG_PM
 	.suspend = _tas_suspend,
 	.resume = _tas_resume,
-#endif
 };
 
 static int tas_init_codec(struct aoa_codec *codec)
-- 
1.5.2.3

^ permalink raw reply related

* [PATCH] [POWERPC] quite section mismatch in hvc_rtas.c
From: Stephen Rothwell @ 2007-07-21 14:31 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev

WARNING: vmlinux.o(.text+0x2066f0): Section mismatch: reference to .init.text:.add_preferred_console (between '.hvc_rtas_console_init' and '.hvc_beat_put_chars')

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/char/hvc_rtas.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Built for PowerPC allmodconfig and ppc64_defconfig.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/drivers/char/hvc_rtas.c b/drivers/char/hvc_rtas.c
index 4b97eaf..bb09413 100644
--- a/drivers/char/hvc_rtas.c
+++ b/drivers/char/hvc_rtas.c
@@ -115,7 +115,7 @@ static void __exit hvc_rtas_exit(void)
 module_exit(hvc_rtas_exit);
 
 /* This will happen prior to module init.  There is no tty at this time? */
-static int hvc_rtas_console_init(void)
+static int __init hvc_rtas_console_init(void)
 {
 	rtascons_put_char_token = rtas_token("put-term-char");
 	if (rtascons_put_char_token == RTAS_UNKNOWN_SERVICE)
-- 
1.5.2.3

^ permalink raw reply related

* [PATCH] [POWERPC] init and exit markings for hvc_iseries
From: Stephen Rothwell @ 2007-07-21 14:33 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev


Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/char/hvc_iseries.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Built for PowerPC allmodconfig and ppc64_defconfig.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c
index b37f1d5..a08f8f9 100644
--- a/drivers/char/hvc_iseries.c
+++ b/drivers/char/hvc_iseries.c
@@ -472,7 +472,7 @@ static void hvc_handle_event(struct HvLpEvent *event)
 	}
 }
 
-static int send_open(HvLpIndex remoteLp, void *sem)
+static int __init send_open(HvLpIndex remoteLp, void *sem)
 {
 	return HvCallEvent_signalLpEventFast(remoteLp,
 			HvLpEvent_Type_VirtualIo,
@@ -484,7 +484,7 @@ static int send_open(HvLpIndex remoteLp, void *sem)
 			0, 0, 0, 0);
 }
 
-static int hvc_vio_init(void)
+static int __init hvc_vio_init(void)
 {
 	atomic_t wait_flag;
 	int rc;
@@ -552,14 +552,14 @@ static int hvc_vio_init(void)
 }
 module_init(hvc_vio_init); /* after drivers/char/hvc_console.c */
 
-static void hvc_vio_exit(void)
+static void __exit hvc_vio_exit(void)
 {
 	vio_unregister_driver(&hvc_vio_driver);
 }
 module_exit(hvc_vio_exit);
 
 /* the device tree order defines our numbering */
-static int hvc_find_vtys(void)
+static int __init hvc_find_vtys(void)
 {
 	struct device_node *vty;
 	int num_found = 0;
-- 
1.5.2.3

^ permalink raw reply related

* [PATCH] [POWERPC] quiet section mismatch warning on pcibios_setup
From: Stephen Rothwell @ 2007-07-21 14:37 UTC (permalink / raw)
  To: paulus; +Cc: ppc-dev

WARNING: vmlinux.o(.text+0x1cefcc): Section mismatch: reference to .init.text:.pcibios_setup (between '.pci_setup' and '.pci_init')

pci_setup() is marked __devinit and calls pcibios_setup.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/kernel/pci-common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Built for PowerPC allmodconfig and ppc64_defconfig.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 94b4a02..fe7d125 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -166,7 +166,7 @@ int pcibios_add_platform_entries(struct pci_dev *pdev)
 
 }
 
-char __init *pcibios_setup(char *str)
+char __devinit *pcibios_setup(char *str)
 {
 	return str;
 }
-- 
1.5.2.3

^ permalink raw reply related

* Matt Tyrlik is out of the office.
From: Matt Tyrlik @ 2007-07-21 14:49 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]


I will be out of the office starting  07/13/2007 and will not return until
07/24/2007.

I will respond to your message when I return.  I will not check e-mail
while out of the office.

[-- Attachment #2: Type: text/html, Size: 221 bytes --]

^ permalink raw reply

* [PATCH][09/37] Clean up duplicate includes in drivers/macintosh/
From: Jesper Juhl @ 2007-07-21 15:02 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Andrew Morton, Jesper Juhl, linuxppc-dev

Hi,

This patch cleans up duplicate includes in
	drivers/macintosh/


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c
index 4177ff0..2c21d4f 100644
--- a/drivers/macintosh/rack-meter.c
+++ b/drivers/macintosh/rack-meter.c
@@ -30,7 +30,6 @@
 #include <asm/machdep.h>
 #include <asm/pmac_feature.h>
 #include <asm/dbdma.h>
-#include <asm/dbdma.h>
 #include <asm/macio.h>
 #include <asm/keylargo.h>
 

^ permalink raw reply related

* [PATCH][12/37] Clean up duplicate includes in drivers/net/
From: Jesper Juhl @ 2007-07-21 15:02 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: info, Patrick McHardy, Judy Fischbach, Luke Yang, bonding-devel,
	Bryan Wu, kong.lai, Jay Vosburgh, James Morris, linuxppc-embedded,
	Alexey Kuznetsov, Alex V Lasso, Ulrich Kunitz, Chad Tindel,
	Amit S Kale, Jay Cliburn, Samuel Ortiz, Brian Pugh, Daniel Drake,
	Chris Snook, alexandre.bounine, Pantelis Antoniou, netdev,
	Jesper Juhl, linux-wireless, Ralf Baechle, Vitaly Bordug,
	Lukasz Stelmach, Ron Mercer, atl1-devel, Andrew Morton,
	David S. Miller, James P Ketrenos

Hi,

This patch cleans up duplicate includes in
	 drivers/net/


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index fd1e156..4a18b88 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -75,7 +75,6 @@
 #include <linux/compiler.h>
 #include <linux/delay.h>
 #include <linux/mii.h>
-#include <linux/interrupt.h>
 #include <net/checksum.h>
 
 #include <asm/atomic.h>
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 9a08d65..01281ee 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -47,15 +47,10 @@
 #include <linux/spinlock.h>
 #include <linux/ethtool.h>
 #include <linux/mii.h>
-
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
-
 #include <linux/platform_device.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
 
 #include <asm/dma.h>
 #include <linux/dma-mapping.h>
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 60cccf2..9afd172 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -31,7 +31,6 @@
 #include <linux/inetdevice.h>
 #include <linux/in.h>
 #include <linux/sysfs.h>
-#include <linux/string.h>
 #include <linux/ctype.h>
 #include <linux/inet.h>
 #include <linux/rtnetlink.h>
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index a4a2a0e..27de3d8 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -39,8 +39,6 @@
 
 #include <linux/vmalloc.h>
 #include <asm/pgtable.h>
-
-#include <asm/pgtable.h>
 #include <asm/irq.h>
 #include <asm/uaccess.h>
 
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index d8e779c..43c8668 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -45,7 +45,6 @@
 #include <linux/crc32.h>
 #include <linux/workqueue.h>
 #include <linux/ethtool.h>
-#include <linux/netdevice.h>
 #include <linux/fsl_devices.h>
 #include "gianfar_mii.h"
 
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c
index 7b411c1..2470903 100644
--- a/drivers/net/gianfar_ethtool.c
+++ b/drivers/net/gianfar_ethtool.c
@@ -34,7 +34,6 @@
 #include <linux/module.h>
 #include <linux/crc32.h>
 #include <asm/types.h>
-#include <asm/uaccess.h>
 #include <linux/ethtool.h>
 #include <linux/mii.h>
 #include <linux/phy.h>
diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c
index bdd5c97..4c0d379 100644
--- a/drivers/net/irda/kingsun-sir.c
+++ b/drivers/net/irda/kingsun-sir.c
@@ -66,7 +66,6 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/slab.h>
-#include <linux/module.h>
 #include <linux/kref.h>
 #include <linux/usb.h>
 #include <linux/device.h>
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c
index 0de8672..bfc5752 100644
--- a/drivers/net/irda/mcs7780.c
+++ b/drivers/net/irda/mcs7780.c
@@ -50,7 +50,6 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/slab.h>
-#include <linux/module.h>
 #include <linux/kref.h>
 #include <linux/usb.h>
 #include <linux/device.h>
diff --git a/drivers/net/mipsnet.c b/drivers/net/mipsnet.c
index 9853c74..c0f5ad3 100644
--- a/drivers/net/mipsnet.c
+++ b/drivers/net/mipsnet.c
@@ -11,7 +11,6 @@
 #include <linux/module.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
-#include <linux/netdevice.h>
 #include <linux/platform_device.h>
 #include <asm/io.h>
 #include <asm/mips-boards/simint.h>
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index b703ccf..6ba8e07 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -39,7 +39,6 @@
 #include "netxen_nic_phan_reg.h"
 
 #include <linux/dma-mapping.h>
-#include <linux/vmalloc.h>
 #include <net/ip.h>
 
 MODULE_DESCRIPTION("NetXen Multi port (1/10) Gigabit Network Driver");
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 8be8be4..c2fc2f7 100755
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -31,7 +31,6 @@
 #include <linux/skbuff.h>
 #include <linux/rtnetlink.h>
 #include <linux/if_vlan.h>
-#include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/mm.h>
 
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index 1aabc91..a059f3d 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -47,7 +47,6 @@
 #include <linux/rtnetlink.h>
 #include <linux/timer.h>
 #include <linux/platform_device.h>
-#include <linux/etherdevice.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h
index 626a240..9c973b9 100644
--- a/drivers/net/wireless/ipw2200.h
+++ b/drivers/net/wireless/ipw2200.h
@@ -45,7 +45,6 @@
 
 #include <linux/firmware.h>
 #include <linux/wireless.h>
-#include <linux/dma-mapping.h>
 #include <linux/jiffies.h>
 #include <asm/io.h>
 
diff --git a/drivers/net/wireless/zd1211rw/zd_def.h b/drivers/net/wireless/zd1211rw/zd_def.h
index deb99d1..505b4d7 100644
--- a/drivers/net/wireless/zd1211rw/zd_def.h
+++ b/drivers/net/wireless/zd1211rw/zd_def.h
@@ -21,7 +21,6 @@
 #include <linux/kernel.h>
 #include <linux/stringify.h>
 #include <linux/device.h>
-#include <linux/kernel.h>
 
 typedef u16 __nocast zd_addr_t;
 

^ permalink raw reply related

* [PATCH][36/37] Clean up duplicate includes in sound/ppc/
From: Jesper Juhl @ 2007-07-21 15:04 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: linuxppc-dev, Andrew Morton, Jesper Juhl, cbe-oss-dev

Hi,

This patch cleans up duplicate includes in
	XXXX/


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c
index 1aa0b46..27b6189 100644
--- a/sound/ppc/snd_ps3.c
+++ b/sound/ppc/snd_ps3.c
@@ -33,7 +33,6 @@
 #include <linux/dmapool.h>
 #include <linux/dma-mapping.h>
 #include <asm/firmware.h>
-#include <linux/io.h>
 #include <asm/dma.h>
 #include <asm/lv1call.h>
 #include <asm/ps3.h>

^ permalink raw reply related

* Re: [PATCH][12/37] Clean up duplicate includes in drivers/net/
From: Chris Snook @ 2007-07-21 16:40 UTC (permalink / raw)
  To: Jesper Juhl, viro
  Cc: info, Patrick McHardy, Judy Fischbach, Luke Yang, bonding-devel,
	Bryan Wu, kong.lai, Jay Vosburgh, James Morris, linuxppc-embedded,
	Alexey Kuznetsov, Alex V Lasso, Ulrich Kunitz, Chad Tindel,
	Amit S Kale, Jay Cliburn, Samuel Ortiz, Brian Pugh, Daniel Drake,
	alexandre.bounine, Pantelis Antoniou, netdev, linux-wireless,
	Linux Kernel Mailing List, Ralf Baechle, Vitaly Bordug,
	Lukasz Stelmach, Ron Mercer, atl1-devel, Andrew Morton,
	David S. Miller, James P Ketrenos
In-Reply-To: <200707211702.46375.jesper.juhl@gmail.com>

Jesper Juhl wrote:
> Hi,
> 
> This patch cleans up duplicate includes in
> 	 drivers/net/
> 
> 
> Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
> ---
> 
> diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
> index fd1e156..4a18b88 100644
> --- a/drivers/net/atl1/atl1_main.c
> +++ b/drivers/net/atl1/atl1_main.c
> @@ -75,7 +75,6 @@
>  #include <linux/compiler.h>
>  #include <linux/delay.h>
>  #include <linux/mii.h>
> -#include <linux/interrupt.h>
>  #include <net/checksum.h>
>  
>  #include <asm/atomic.h>

Define "duplicate".  I ask because this patch just got posted a few days ago:

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
  drivers/net/atl1/atl1_main.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 4a18b88..fd1e156 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -75,6 +75,7 @@
  #include <linux/compiler.h>
  #include <linux/delay.h>
  #include <linux/mii.h>
+#include <linux/interrupt.h>
  #include <net/checksum.h>

  #include <asm/atomic.h>

I've always been under the impression that one should include all the files 
whose contents you use directly, because other includes that happen to include 
them might no longer need to in the future and cease including them.  You can 
fight it out with Al if you feel like it.  I'm keeping the rest of the CC list 
because the other maintainers might have similar feelings about the 
appropriateness of these includes in their drivers.

	-- Chris

^ permalink raw reply related

* Re: [PATCH][12/37] Clean up duplicate includes in drivers/net/
From: Al Viro @ 2007-07-21 16:46 UTC (permalink / raw)
  To: Chris Snook
  Cc: info, Patrick McHardy, Judy Fischbach, Luke Yang, bonding-devel,
	Bryan Wu, kong.lai, Jay Vosburgh, James Morris, linuxppc-embedded,
	Alexey Kuznetsov, Alex V Lasso, Ulrich Kunitz, Chad Tindel,
	Amit S Kale, Jay Cliburn, Samuel Ortiz, Brian Pugh, Daniel Drake,
	alexandre.bounine, Pantelis Antoniou, netdev, Jesper Juhl,
	linux-wireless, Linux Kernel Mailing List, Ralf Baechle,
	Vitaly Bordug, Lukasz Stelmach, Ron Mercer, atl1-devel,
	Andrew Morton, David S. Miller, James P Ketrenos
In-Reply-To: <46A236FC.2080300@redhat.com>

On Sat, Jul 21, 2007 at 12:40:28PM -0400, Chris Snook wrote:
> Define "duplicate".  I ask because this patch just got posted a few days 
> ago:

... and it had been wrong - it's really a duplicate (check several lines
above).  My apologies.

^ permalink raw reply

* Re: [PATCH][12/37] Clean up duplicate includes in drivers/net/
From: Jesper Juhl @ 2007-07-21 16:48 UTC (permalink / raw)
  To: Chris Snook
  Cc: info, Luke Yang, Judy Fischbach, Patrick McHardy, bonding-devel,
	Bryan Wu, kong.lai, Jay Vosburgh, James Morris, linuxppc-embedded,
	Alexey Kuznetsov, Alex V Lasso, Ulrich Kunitz, Chad Tindel,
	Amit S Kale, Jay Cliburn, Samuel Ortiz, Daniel Drake, Brian Pugh,
	viro, alexandre.bounine, Pantelis Antoniou, netdev,
	linux-wireless, Linux Kernel Mailing List, Ralf Baechle,
	Vitaly Bordug, Lukasz Stelmach, Ron Mercer, atl1-devel,
	Andrew Morton, David S. Miller, James P Ketrenos
In-Reply-To: <46A236FC.2080300@redhat.com>

On 21/07/07, Chris Snook <csnook@redhat.com> wrote:
> Jesper Juhl wrote:
> > Hi,
> >
> > This patch cleans up duplicate includes in
> >        drivers/net/
> >
> >
> > Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
> > ---
> >
> > diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
> > index fd1e156..4a18b88 100644
> > --- a/drivers/net/atl1/atl1_main.c
> > +++ b/drivers/net/atl1/atl1_main.c
> > @@ -75,7 +75,6 @@
> >  #include <linux/compiler.h>
> >  #include <linux/delay.h>
> >  #include <linux/mii.h>
> > -#include <linux/interrupt.h>
> >  #include <net/checksum.h>
> >
> >  #include <asm/atomic.h>
>
> Define "duplicate".  I ask because this patch just got posted a few days ago:
>

duplicate == present more than once in the same source file.
Did you try looking at the includes in the source file the patch modifies?


> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
>   drivers/net/atl1/atl1_main.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
> index 4a18b88..fd1e156 100644
> --- a/drivers/net/atl1/atl1_main.c
> +++ b/drivers/net/atl1/atl1_main.c
> @@ -75,6 +75,7 @@
>   #include <linux/compiler.h>
>   #include <linux/delay.h>
>   #include <linux/mii.h>
> +#include <linux/interrupt.h>
>   #include <net/checksum.h>
>
>   #include <asm/atomic.h>
>
> I've always been under the impression that one should include all the files
> whose contents you use directly, because other includes that happen to include
> them might no longer need to in the future and cease including them.

I agree completely. But that's completely beside the point here.

Before Al's patch, drivers/net/atl1/atl1_main.c already contained
"#include <linux/interrupt.h>".

> You can
> fight it out with Al if you feel like it.  I'm keeping the rest of the CC list
> because the other maintainers might have similar feelings about the
> appropriateness of these includes in their drivers.
>

Take a look at the file. These are the includes at the top of
drivers/net/atl1/atl1_main.c :

...
#include <linux/types.h>
#include <linux/netdevice.h>
#include <linux/pci.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/skbuff.h>
#include <linux/etherdevice.h>
#include <linux/if_vlan.h>
#include <linux/irqreturn.h>
#include <linux/workqueue.h>
#include <linux/timer.h>
#include <linux/jiffies.h>
#include <linux/hardirq.h>
#include <linux/interrupt.h>          <--- Here we have linux/interrupt.h
#include <linux/irqflags.h>
#include <linux/dma-mapping.h>
#include <linux/net.h>
#include <linux/pm.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/compiler.h>
#include <linux/delay.h>
#include <linux/mii.h>
#include <linux/interrupt.h>          <--- And here we include it again.
#include <net/checksum.h>

#include <asm/atomic.h>
#include <asm/byteorder.h>

#include "atl1.h"
...

Now please tell me why it makes sense to include the same header twice
and why my patch that removes the duplicate does not make sense.

-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

^ permalink raw reply

* Re: [PATCH][12/37] Clean up duplicate includes in drivers/net/
From: Chris Snook @ 2007-07-21 16:50 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: info, Luke Yang, Judy Fischbach, Patrick McHardy, bonding-devel,
	Bryan Wu, kong.lai, Jay Vosburgh, James Morris, linuxppc-embedded,
	Alexey Kuznetsov, Alex V Lasso, Ulrich Kunitz, Chad Tindel,
	Amit S Kale, Jay Cliburn, Samuel Ortiz, Daniel Drake, Brian Pugh,
	viro, alexandre.bounine, Pantelis Antoniou, netdev,
	linux-wireless, Linux Kernel Mailing List, Ralf Baechle,
	Vitaly Bordug, Lukasz Stelmach, Ron Mercer, atl1-devel,
	Andrew Morton, David S. Miller, James P Ketrenos
In-Reply-To: <9a8748490707210948k468f8f32k718d84279aa56ce9@mail.gmail.com>

Jesper Juhl wrote:
> On 21/07/07, Chris Snook <csnook@redhat.com> wrote:
>> Jesper Juhl wrote:
>> > Hi,
>> >
>> > This patch cleans up duplicate includes in
>> >        drivers/net/
>> >
>> >
>> > Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
>> > ---
>> >
>> > diff --git a/drivers/net/atl1/atl1_main.c 
>> b/drivers/net/atl1/atl1_main.c
>> > index fd1e156..4a18b88 100644
>> > --- a/drivers/net/atl1/atl1_main.c
>> > +++ b/drivers/net/atl1/atl1_main.c
>> > @@ -75,7 +75,6 @@
>> >  #include <linux/compiler.h>
>> >  #include <linux/delay.h>
>> >  #include <linux/mii.h>
>> > -#include <linux/interrupt.h>
>> >  #include <net/checksum.h>
>> >
>> >  #include <asm/atomic.h>
>>
>> Define "duplicate".  I ask because this patch just got posted a few 
>> days ago:
>>
> 
> duplicate == present more than once in the same source file.
> Did you try looking at the includes in the source file the patch modifies?

Nope!  Mea Culpa.

	-- Chris

^ permalink raw reply

* Re: [PATCH] Fix tas_suspend/resume build warning
From: Johannes Berg @ 2007-07-21 17:29 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Takashi Iwai, linuxppc-dev, alsa-devel, Andrew Morton
In-Reply-To: <20070722002937.11e234f8.sfr@canb.auug.org.au>

On Sun, 2007-07-22 at 00:29 +1000, Stephen Rothwell wrote:
> sound/aoa/codecs/snd-aoa-codec-tas.c:750: warning: 'tas_suspend' defined but not used
> sound/aoa/codecs/snd-aoa-codec-tas.c:760: warning: 'tas_resume' defined but not used

Heh. I daresay I never compiled a kernel without PM. Not sure why you'd
want to, but still good to have it fixed. Thanks.


[full copy below for Takashi, I suppose it'll go through his tree]

From: Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Fix tas_suspend/resume build warning

sound/aoa/codecs/snd-aoa-codec-tas.c:750: warning: 'tas_suspend' defined but not used
sound/aoa/codecs/snd-aoa-codec-tas.c:760: warning: 'tas_resume' defined but not used

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
---
 sound/aoa/codecs/snd-aoa-codec-tas.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c
index 2f771f5..3cbfe46 100644
--- a/sound/aoa/codecs/snd-aoa-codec-tas.c
+++ b/sound/aoa/codecs/snd-aoa-codec-tas.c
@@ -743,6 +743,7 @@ static int tas_switch_clock(struct codec_info_item *cii, enum clock_switch clock
 	return 0;
 }
 
+#ifdef CONFIG_PM
 /* we are controlled via i2c and assume that is always up
  * If that wasn't the case, we'd have to suspend once
  * our i2c device is suspended, and then take note of that! */
@@ -768,7 +769,6 @@ static int tas_resume(struct tas *tas)
 	return 0;
 }
 
-#ifdef CONFIG_PM
 static int _tas_suspend(struct codec_info_item *cii, pm_message_t state)
 {
 	return tas_suspend(cii->codec_data);
@@ -778,7 +778,10 @@ static int _tas_resume(struct codec_info_item *cii)
 {
 	return tas_resume(cii->codec_data);
 }
-#endif
+#else /* CONFIG_PM */
+#define _tas_suspend	NULL
+#define _tas_resume	NULL
+#endif /* CONFIG_PM */
 
 static struct codec_info tas_codec_info = {
 	.transfers = tas_transfers,
@@ -791,10 +794,8 @@ static struct codec_info tas_codec_info = {
 	.owner = THIS_MODULE,
 	.usable = tas_usable,
 	.switch_clock = tas_switch_clock,
-#ifdef CONFIG_PM
 	.suspend = _tas_suspend,
 	.resume = _tas_resume,
-#endif
 };
 
 static int tas_init_codec(struct aoa_codec *codec)

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox