* 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
* [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
* [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][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
* 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] [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
* [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] 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] 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] 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] [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 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
* 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
* 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
* 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: [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: [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: [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: [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: [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: 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: [PATCH] powerpc: mpic protected sources
From: Arnd Bergmann @ 2007-07-21 0:00 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Paul Mackerras
In-Reply-To: <1184975721.5439.33.camel@localhost.localdomain>
On Saturday 21 July 2007, Benjamin Herrenschmidt wrote:
> 0% probability of being spam.
>=20
> Full report:
> No, score=3D-2.5 required=3D5.0 tests=3DAWL,BAYES_00 autolearn=3Dham ver=
sion=3D3.1.7-deb =A0
> Some HW platforms, such as the new cell blades, requires some MPIC sources
> to be left alone by the operating system. This patch implements support f=
or
> a "protected-sources" property in the mpic controller node containing a l=
ist
> of source numbers to be protected against operating system interference.
>=20
> For those interested in the gory details, the MPIC on the southbridge of
> those blades has some of the processor outputs routed to the cell, and
> at least one routed as a GPIO to the service processor. It will be used
> in the GA product for routing some of the southbridge error interrupts
> to the service processor which implements some of the RAS stuff, such
> as checkstopping when fatal errors occurs before they can propagate.
>=20
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
^ permalink raw reply
* Re: [i2c] [PATCH] i2c-mpc: work around missing-9th-clock-pulse bug
From: Guennadi Liakhovetski @ 2007-07-21 0:03 UTC (permalink / raw)
To: Domen Puncer; +Cc: khali, i2c, linuxppc-embedded
In-Reply-To: <20070709071955.GD4186@moe.telargo.com>
On Mon, 9 Jul 2007, Domen Puncer wrote:
> Work around a problem reported on:
> http://ozlabs.org/pipermail/linuxppc-embedded/2005-July/019038.html
> Without this patch I2C on mpc5200 becomes unusable after a while.
> Tested on mpc5200 based boards by Matthias and me.
Domen, unfortunately, your suspicion, expressed on IRC, was right. It is
this patch that breaks i2c on mpc8241 (linkstation). Reverting it fixes
the problem. For reference, here's a rtc-debug log with this patch
(linux-2.6 tree of 19.07):
rtc-rs5c372 0-0032: rs5c372_probe
rtc-rs5c372 0-0032: 52 28 21 (04) 19 07 07 (15), 04 00 6a, 08 00 3e; 00 20
rtc-rs5c372 0-0032: 28 21 04 (19) 07 07 15 (04), 00 6a 08, 00 3e 00; 20 52
rtc-rs5c372 0-0032: rs5c372_get_datetime: tm is secs=28, mins=21, hours=4, mday=7, mon=6, year=115, wday=1
rtc-rs5c372 0-0032: rs5c372b found, 24hr, driver version 0.5
rtc-rs5c372: dev (254:0)
rtc-rs5c372 0-0032: rtc core: registered rtc-rs5c372 as rtc0
rtc-rs5c372 0-0032: 21 04 19 (07) 07 15 04 (00), 6a 08 00, 3e 00 20; 52 28
rtc-rs5c372 0-0032: rs5c372_get_datetime: tm is secs=21, mins=4, hours=19, mday=7, mon=14, year=104, wday=7
rtc-rs5c372 0-0032: hctosys: unable to read the hardware clock
Let me know when you'll have any patches to test.
Thanks
Guennadi
>
>
> Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
>
> ---
> drivers/i2c/busses/i2c-mpc.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> Index: work-powerpc.git/drivers/i2c/busses/i2c-mpc.c
> ===================================================================
> --- work-powerpc.git.orig/drivers/i2c/busses/i2c-mpc.c
> +++ work-powerpc.git/drivers/i2c/busses/i2c-mpc.c
> @@ -74,6 +74,20 @@ static irqreturn_t mpc_i2c_isr(int irq,
> return IRQ_HANDLED;
> }
>
> +static void mpc_i2c_fixup(struct mpc_i2c *i2c)
> +{
> + writeccr(i2c, 0);
> + udelay(30);
> + writeccr(i2c, CCR_MEN);
> + udelay(30);
> + writeccr(i2c, CCR_MSTA | CCR_MTX);
> + udelay(30);
> + writeccr(i2c, CCR_MSTA | CCR_MTX | CCR_MEN);
> + udelay(30);
> + writeccr(i2c, CCR_MEN);
> + udelay(30);
> +}
> +
> static int i2c_wait(struct mpc_i2c *i2c, unsigned timeout, int writing)
> {
> unsigned long orig_jiffies = jiffies;
> @@ -153,6 +167,9 @@ static void mpc_i2c_start(struct mpc_i2c
> static void mpc_i2c_stop(struct mpc_i2c *i2c)
> {
> writeccr(i2c, CCR_MEN);
> + mb();
> + writeccr(i2c, 0);
> + mb();
> }
>
> static int mpc_write(struct mpc_i2c *i2c, int target,
> @@ -245,6 +262,8 @@ static int mpc_xfer(struct i2c_adapter *
> }
> if (time_after(jiffies, orig_jiffies + HZ)) {
> pr_debug("I2C: timeout\n");
> + if (readb(i2c->base + MPC_I2C_SR) == (CSR_MCF | CSR_MBB | CSR_RXAK))
> + mpc_i2c_fixup(i2c);
> return -EIO;
> }
> schedule();
>
> _______________________________________________
> i2c mailing list
> i2c@lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/i2c
>
---
Guennadi Liakhovetski
^ permalink raw reply
* [PATCH] powerpc: mpic protected sources
From: Benjamin Herrenschmidt @ 2007-07-20 23:55 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list
In-Reply-To: <OFD54BD0CE.6883770C-ONC125731D.00322C4C-C125731D.00324A9E@de.ibm.com>
Some HW platforms, such as the new cell blades, requires some MPIC sources
to be left alone by the operating system. This patch implements support for
a "protected-sources" property in the mpic controller node containing a list
of source numbers to be protected against operating system interference.
For those interested in the gory details, the MPIC on the southbridge of
those blades has some of the processor outputs routed to the cell, and
at least one routed as a GPIO to the service processor. It will be used
in the GA product for routing some of the southbridge error interrupts
to the service processor which implements some of the RAS stuff, such
as checkstopping when fatal errors occurs before they can propagate.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Should probably go in 2.6.23, whether it's a bug fix or not is debatable,
it's part of a late HW+SW+FW fix of the blades for reliability purposes.
Index: linux-work/arch/powerpc/sysdev/mpic.c
===================================================================
--- linux-work.orig/arch/powerpc/sysdev/mpic.c 2007-07-19 17:00:32.000000000 +1000
+++ linux-work/arch/powerpc/sysdev/mpic.c 2007-07-19 17:25:21.000000000 +1000
@@ -877,6 +877,8 @@ static int mpic_host_map(struct irq_host
if (hw == mpic->spurious_vec)
return -EINVAL;
+ if (mpic->protected && test_bit(hw, mpic->protected))
+ return -EINVAL;
#ifdef CONFIG_SMP
else if (hw >= mpic->ipi_vecs[0]) {
@@ -1034,6 +1036,25 @@ struct mpic * __init mpic_alloc(struct d
if (node && of_get_property(node, "big-endian", NULL) != NULL)
mpic->flags |= MPIC_BIG_ENDIAN;
+ /* Look for protected sources */
+ if (node) {
+ unsigned int psize, bits, mapsize;
+ const u32 *psrc =
+ of_get_property(node, "protected-sources", &psize);
+ if (psrc) {
+ psize /= 4;
+ bits = intvec_top + 1;
+ mapsize = BITS_TO_LONGS(bits) * sizeof(unsigned long);
+ mpic->protected = alloc_bootmem(mapsize);
+ BUG_ON(mpic->protected == NULL);
+ memset(mpic->protected, 0, mapsize);
+ for (i = 0; i < psize; i++) {
+ if (psrc[i] > intvec_top)
+ continue;
+ __set_bit(psrc[i], mpic->protected);
+ }
+ }
+ }
#ifdef CONFIG_MPIC_WEIRD
mpic->hw_set = mpic_infos[MPIC_GET_REGSET(flags)];
@@ -1213,6 +1234,9 @@ void __init mpic_init(struct mpic *mpic)
u32 vecpri = MPIC_VECPRI_MASK | i |
(8 << MPIC_VECPRI_PRIORITY_SHIFT);
+ /* check if protected */
+ if (mpic->protected && test_bit(i, mpic->protected))
+ continue;
/* init hw */
mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION),
@@ -1407,6 +1431,14 @@ unsigned int mpic_get_one_irq(struct mpi
mpic_eoi(mpic);
return NO_IRQ;
}
+ if (unlikely(mpic->protected && test_bit(src, mpic->protected))) {
+ if (printk_ratelimit())
+ printk(KERN_WARNING "%s: Got protected source %d !\n",
+ mpic->name, (int)src);
+ mpic_eoi(mpic);
+ return NO_IRQ;
+ }
+
return irq_linear_revmap(mpic->irqhost, src);
}
Index: linux-work/include/asm-powerpc/mpic.h
===================================================================
--- linux-work.orig/include/asm-powerpc/mpic.h 2007-07-19 16:59:44.000000000 +1000
+++ linux-work/include/asm-powerpc/mpic.h 2007-07-19 17:02:35.000000000 +1000
@@ -296,6 +296,9 @@ struct mpic
unsigned int dcr_base;
#endif
+ /* Protected sources */
+ unsigned long *protected;
+
#ifdef CONFIG_MPIC_WEIRD
/* Pointer to HW info array */
u32 *hw_set;
^ permalink raw reply
* Re: [PATCH v3] pcmcia: CompactFlash driver for PA Semi Electra boards
From: Andrew Morton @ 2007-07-20 23:48 UTC (permalink / raw)
To: Olof Johansson
Cc: Christoph Hellwig, linuxppc-dev, linux-pcmcia, linux-kernel,
miltonm
In-Reply-To: <20070705144914.GA14284@lixom.net>
On Thu, 5 Jul 2007 09:49:14 -0500
olof@lixom.net (Olof Johansson) wrote:
> Driver for the CompactFlash slot on the PA Semi Electra eval board. It's
> a simple device sitting on localbus, with interrupts and detect/voltage
> control over GPIO.
>
> The driver is implemented as an of_platform driver, and adds localbus
> as a bus being probed by the of_platform framework.
>
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
>
> ---
>
> On Mon, Jun 25, 2007 at 03:43:41PM -0500, olof wrote:
>
> > The ifdef is needed since for CONFIG_PCMCIA=n builds, the bus notifier
> > isn't available. I wanted to do the bus notifier registration explicitly
> > before the of_platform bus probe to avoid later surprises due to reordered
> > initcalls in case it was split up in it's own initcall.
> >
> > I could add the code under ifdef as well, but it didn't seem too
> > critical. Once the second major board comes along I'll probably move it
> > out to a per-board file, there's no real need for it just yet.
>
> Alright, turns out I still need to declare the extern bus type, which would mean
> two #ifdefs in one function. Moving it out instead.
>
> I've addressed Milton's comments as well.
>
> Who's maintaining PCMCIA? MAINTAINERS only lists a mailing list, no person. Seems
> weird for a component that's marked as maintained.
Dominik Brodowski. He's having a bit of downtime at present (exams, I
think). He expects to return. Meanwhile, cc'ing me usually has some
effect.
>
> ...
>
> +static const char driver_name[] = "electra-cf";
>
> ...
>
> +static struct of_device_id electra_cf_match[] =
> +{
> + {
> + .compatible = "electra-cf",
> + },
> + {},
> +};
Could have reused driver_name[] here, if that was appropriate.
> +static struct of_platform_driver electra_cf_driver =
> +{
> + .name = (char *)driver_name,
ug. But it's not your fault - we should have always made it const.
> --- mainline.orig/arch/powerpc/platforms/pasemi/setup.c
> +++ mainline/arch/powerpc/platforms/pasemi/setup.c
I never know who maintains random-scruffy-ppc code like this. From a peek
in the git-whatchanged output, it appears to be yourself.
Have a few little fixies:
--- a/drivers/pcmcia/electra_cf.c~pcmcia-compactflash-driver-for-pa-semi-electra-boards-fix
+++ a/drivers/pcmcia/electra_cf.c
@@ -201,9 +201,7 @@ static int __devinit electra_cf_probe(st
if (!cf)
return -ENOMEM;
- init_timer(&cf->timer);
- cf->timer.function = electra_cf_timer;
- cf->timer.data = (unsigned long) cf;
+ setup_timer(&cf->timer, electra_cf_timer, (unsigned long)cf);
cf->irq = NO_IRQ;
cf->ofdev = ofdev;
@@ -340,16 +338,14 @@ static int __devexit electra_cf_remove(s
return 0;
}
-static struct of_device_id electra_cf_match[] =
-{
+static struct of_device_id electra_cf_match[] = {
{
.compatible = "electra-cf",
},
{},
};
-static struct of_platform_driver electra_cf_driver =
-{
+static struct of_platform_driver electra_cf_driver = {
.name = (char *)driver_name,
.match_table = electra_cf_match,
.probe = electra_cf_probe,
@@ -371,4 +367,3 @@ module_exit(electra_cf_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>");
MODULE_DESCRIPTION("PA Semi Electra CF driver");
-
_
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox