From bdd4f8cbd2c9b9dc7e51c668fd9043ac0af4243d Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 7 Nov 2012 02:37:09 +0000 Subject: UAPI: Fix compilation of the wanxl firmware blob. The wanxl firmware needs access to some bits of UAPI stuff, so the -I flag in the Makefile needs adjusting to point at the UAPI headers. Signed-off-by: David Howells Signed-off-by: David S. Miller --- drivers/net/wan/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/wan') diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile index eac709bed7ae..4dac96b3db2a 100644 --- a/drivers/net/wan/Makefile +++ b/drivers/net/wan/Makefile @@ -52,7 +52,7 @@ endif quiet_cmd_build_wanxlfw = BLD FW $@ cmd_build_wanxlfw = \ - $(CPP) -Wp,-MD,$(depfile) -I$(srctree)/include $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \ + $(CPP) -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \ $(LD68K) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \ hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x ,//g;1s/^/static u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \ rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o -- cgit v1.2.3 From c48c8d51c29efba160a1b27555d97f6ee0d049a6 Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 7 Nov 2012 02:37:24 +0000 Subject: Fix the wanxl firmware to include missing constants Fix the wanxl firmware to include missing constants such as PARITY_NONE. It should be #including the linux/hdlc/ioctl.h header. To make this work, we also have to guard parts of ioctl.h with !__ASSEMBLY__. Signed-off-by: David Howells Signed-off-by: David S. Miller --- drivers/net/wan/Makefile | 2 +- drivers/net/wan/wanxlfw.S | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/net/wan') diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile index 4dac96b3db2a..b0a61636fc94 100644 --- a/drivers/net/wan/Makefile +++ b/drivers/net/wan/Makefile @@ -52,7 +52,7 @@ endif quiet_cmd_build_wanxlfw = BLD FW $@ cmd_build_wanxlfw = \ - $(CPP) -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \ + $(CPP) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \ $(LD68K) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \ hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x ,//g;1s/^/static u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \ rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o diff --git a/drivers/net/wan/wanxlfw.S b/drivers/net/wan/wanxlfw.S index 73aae2bf2f1c..21565d59ec7b 100644 --- a/drivers/net/wan/wanxlfw.S +++ b/drivers/net/wan/wanxlfw.S @@ -35,6 +35,7 @@ */ #include +#include #include "wanxl.h" /* memory addresses and offsets */ -- cgit v1.2.3 From b1ead1aea1d7e3c260d896943056453717577525 Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 7 Nov 2012 02:37:31 +0000 Subject: Make the wanxl firmware array const Make the wanxl firmware array const so that it goes in the read-only section. Signed-off-by: David Howells Signed-off-by: David S. Miller --- drivers/net/wan/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/wan') diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile index b0a61636fc94..df70248e2fda 100644 --- a/drivers/net/wan/Makefile +++ b/drivers/net/wan/Makefile @@ -54,7 +54,7 @@ quiet_cmd_build_wanxlfw = BLD FW $@ cmd_build_wanxlfw = \ $(CPP) -D__ASSEMBLY__ -Wp,-MD,$(depfile) -I$(srctree)/include/uapi $< | $(AS68K) -m68360 -o $(obj)/wanxlfw.o; \ $(LD68K) --oformat binary -Ttext 0x1000 $(obj)/wanxlfw.o -o $(obj)/wanxlfw.bin; \ - hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x ,//g;1s/^/static u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \ + hexdump -ve '"\n" 16/1 "0x%02X,"' $(obj)/wanxlfw.bin | sed 's/0x ,//g;1s/^/static const u8 firmware[]={/;$$s/,$$/\n};\n/' >$(obj)/wanxlfw.inc; \ rm -f $(obj)/wanxlfw.bin $(obj)/wanxlfw.o $(obj)/wanxlfw.inc: $(src)/wanxlfw.S -- cgit v1.2.3 From 6ad888c679ff7b4143e8a89706a5c097004b168a Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Mon, 3 Dec 2012 09:24:17 -0500 Subject: dscc4: remove __dev* attributes CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton Cc: Francois Romieu Signed-off-by: Greg Kroah-Hartman --- drivers/net/wan/dscc4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/net/wan') diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index ef36cafd44b7..d50223050cf4 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c @@ -707,7 +707,7 @@ static void dscc4_free1(struct pci_dev *pdev) kfree(ppriv); } -static int __devinit dscc4_init_one(struct pci_dev *pdev, +static int dscc4_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { struct dscc4_pci_priv *priv; @@ -1968,7 +1968,7 @@ err_out: return -ENOMEM; } -static void __devexit dscc4_remove_one(struct pci_dev *pdev) +static void dscc4_remove_one(struct pci_dev *pdev) { struct dscc4_pci_priv *ppriv; struct dscc4_dev_priv *root; @@ -2053,7 +2053,7 @@ static struct pci_driver dscc4_driver = { .name = DRV_NAME, .id_table = dscc4_pci_tbl, .probe = dscc4_init_one, - .remove = __devexit_p(dscc4_remove_one), + .remove = dscc4_remove_one, }; module_pci_driver(dscc4_driver); -- cgit v1.2.3 From 5a37931ff0be06b4c774aa604f86ed4566a0ede7 Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Mon, 3 Dec 2012 09:24:18 -0500 Subject: farsync: remove __dev* attributes CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton Cc: Kevin Curtis Signed-off-by: Greg Kroah-Hartman --- drivers/net/wan/farsync.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/net/wan') diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index b6271325f803..56941d6547eb 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c @@ -2361,7 +2361,7 @@ fst_start_xmit(struct sk_buff *skb, struct net_device *dev) * via a printk and leave the corresponding interface and all that follow * disabled. */ -static char *type_strings[] __devinitdata = { +static char *type_strings[] = { "no hardware", /* Should never be seen */ "FarSync T2P", "FarSync T4P", @@ -2371,7 +2371,7 @@ static char *type_strings[] __devinitdata = { "FarSync TE1" }; -static void __devinit +static void fst_init_card(struct fst_card_info *card) { int i; @@ -2415,7 +2415,7 @@ static const struct net_device_ops fst_ops = { * Initialise card when detected. * Returns 0 to indicate success, or errno otherwise. */ -static int __devinit +static int fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) { static int no_of_cards_added = 0; @@ -2615,7 +2615,7 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) /* * Cleanup and close down a card */ -static void __devexit +static void fst_remove_one(struct pci_dev *pdev) { struct fst_card_info *card; @@ -2652,7 +2652,7 @@ static struct pci_driver fst_driver = { .name = FST_NAME, .id_table = fst_pci_dev_id, .probe = fst_add_one, - .remove = __devexit_p(fst_remove_one), + .remove = fst_remove_one, .suspend = NULL, .resume = NULL, }; -- cgit v1.2.3 From aeea6bbfa3f185dcd6f812ece8bed778ec0da3be Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Mon, 3 Dec 2012 09:24:19 -0500 Subject: net/hdlc: remove __dev* attributes CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton Cc: Krzysztof Halasa Signed-off-by: Greg Kroah-Hartman --- drivers/net/wan/hd64570.c | 4 ++-- drivers/net/wan/hd64572.c | 4 ++-- drivers/net/wan/pc300too.c | 2 +- drivers/net/wan/pci200syn.c | 2 +- drivers/net/wan/wanxl.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/net/wan') diff --git a/drivers/net/wan/hd64570.c b/drivers/net/wan/hd64570.c index cf4903355a34..c6e1a4b9e4fb 100644 --- a/drivers/net/wan/hd64570.c +++ b/drivers/net/wan/hd64570.c @@ -676,7 +676,7 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev) #ifdef NEED_DETECT_RAM -static u32 __devinit sca_detect_ram(card_t *card, u8 __iomem *rambase, +static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase, u32 ramsize) { /* Round RAM size to 32 bits, fill from end to start */ @@ -705,7 +705,7 @@ static u32 __devinit sca_detect_ram(card_t *card, u8 __iomem *rambase, #endif /* NEED_DETECT_RAM */ -static void __devinit sca_init(card_t *card, int wait_states) +static void sca_init(card_t *card, int wait_states) { sca_out(wait_states, WCRL, card); /* Wait Control */ sca_out(wait_states, WCRM, card); diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c index e2779faa6c4f..f1685d9624c8 100644 --- a/drivers/net/wan/hd64572.c +++ b/drivers/net/wan/hd64572.c @@ -605,7 +605,7 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev) } -static u32 __devinit sca_detect_ram(card_t *card, u8 __iomem *rambase, +static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase, u32 ramsize) { /* Round RAM size to 32 bits, fill from end to start */ @@ -625,7 +625,7 @@ static u32 __devinit sca_detect_ram(card_t *card, u8 __iomem *rambase, } -static void __devinit sca_init(card_t *card, int wait_states) +static void sca_init(card_t *card, int wait_states) { sca_out(wait_states, WCRL, card); /* Wait Control */ sca_out(wait_states, WCRM, card); diff --git a/drivers/net/wan/pc300too.c b/drivers/net/wan/pc300too.c index 5fe246e060d7..a51cfa7c6540 100644 --- a/drivers/net/wan/pc300too.c +++ b/drivers/net/wan/pc300too.c @@ -297,7 +297,7 @@ static const struct net_device_ops pc300_ops = { .ndo_do_ioctl = pc300_ioctl, }; -static int __devinit pc300_pci_init_one(struct pci_dev *pdev, +static int pc300_pci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { card_t *card; diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c index 9659fcaa34ed..037c423a6328 100644 --- a/drivers/net/wan/pci200syn.c +++ b/drivers/net/wan/pci200syn.c @@ -276,7 +276,7 @@ static const struct net_device_ops pci200_ops = { .ndo_do_ioctl = pci200_ioctl, }; -static int __devinit pci200_pci_init_one(struct pci_dev *pdev, +static int pci200_pci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { card_t *card; diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index feb7541b33fb..b72be1280361 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c @@ -557,7 +557,7 @@ static const struct net_device_ops wanxl_ops = { .ndo_get_stats = wanxl_get_stats, }; -static int __devinit wanxl_pci_init_one(struct pci_dev *pdev, +static int wanxl_pci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { card_t *card; -- cgit v1.2.3 From da3f21b5f997e361a3251e757a10574984593c14 Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Mon, 3 Dec 2012 09:24:20 -0500 Subject: ixp4xx_hss: remove __dev* attributes CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton Cc: Krzysztof Halasa Signed-off-by: Greg Kroah-Hartman --- drivers/net/wan/ixp4xx_hss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/wan') diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c index e9a3da588e95..b617622526b4 100644 --- a/drivers/net/wan/ixp4xx_hss.c +++ b/drivers/net/wan/ixp4xx_hss.c @@ -1326,7 +1326,7 @@ static const struct net_device_ops hss_hdlc_ops = { .ndo_do_ioctl = hss_hdlc_ioctl, }; -static int __devinit hss_init_one(struct platform_device *pdev) +static int hss_init_one(struct platform_device *pdev) { struct port *port; struct net_device *dev; @@ -1377,7 +1377,7 @@ err_free: return err; } -static int __devexit hss_remove_one(struct platform_device *pdev) +static int hss_remove_one(struct platform_device *pdev) { struct port *port = platform_get_drvdata(pdev); -- cgit v1.2.3 From a46182eb9a9b0801776d5b6eca7591774cdea7a8 Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Mon, 3 Dec 2012 09:24:21 -0500 Subject: net/lmc: remove __dev* attributes CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman --- drivers/net/wan/lmc/lmc_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/net/wan') diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index f5d533a706ea..0e443fd0803b 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c @@ -816,7 +816,7 @@ static const struct net_device_ops lmc_ops = { .ndo_get_stats = lmc_get_stats, }; -static int __devinit lmc_init_one(struct pci_dev *pdev, +static int lmc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { lmc_softc_t *sc; @@ -986,7 +986,7 @@ err_req_io: /* * Called from pci when removing module. */ -static void __devexit lmc_remove_one(struct pci_dev *pdev) +static void lmc_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); @@ -1733,7 +1733,7 @@ static struct pci_driver lmc_driver = { .name = "lmc", .id_table = lmc_pci_tbl, .probe = lmc_init_one, - .remove = __devexit_p(lmc_remove_one), + .remove = lmc_remove_one, }; module_pci_driver(lmc_driver); -- cgit v1.2.3 From 1dd06ae8db716e17ec7e06244b858606edf378c0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 6 Dec 2012 14:30:56 +0000 Subject: drivers/net: fix up function prototypes after __dev* removals The __dev* removal patches for the network drivers ended up messing up the function prototypes for a bunch of drivers. This patch fixes all of them back up to be properly aligned. Bonus is that this almost removes 100 lines of code, always a nice surprise. Signed-off-by: Greg Kroah-Hartman Signed-off-by: David S. Miller --- drivers/net/wan/dscc4.c | 3 +-- drivers/net/wan/hd64570.c | 3 +-- drivers/net/wan/hd64572.c | 3 +-- drivers/net/wan/lmc/lmc_main.c | 3 +-- drivers/net/wan/pc300too.c | 2 +- drivers/net/wan/pci200syn.c | 2 +- drivers/net/wan/wanxl.c | 2 +- 7 files changed, 7 insertions(+), 11 deletions(-) (limited to 'drivers/net/wan') diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index d50223050cf4..851dc7b7e8b0 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c @@ -707,8 +707,7 @@ static void dscc4_free1(struct pci_dev *pdev) kfree(ppriv); } -static int dscc4_init_one(struct pci_dev *pdev, - const struct pci_device_id *ent) +static int dscc4_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { struct dscc4_pci_priv *priv; struct dscc4_dev_priv *dpriv; diff --git a/drivers/net/wan/hd64570.c b/drivers/net/wan/hd64570.c index c6e1a4b9e4fb..62f01b74cbd6 100644 --- a/drivers/net/wan/hd64570.c +++ b/drivers/net/wan/hd64570.c @@ -676,8 +676,7 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev) #ifdef NEED_DETECT_RAM -static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase, - u32 ramsize) +static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase, u32 ramsize) { /* Round RAM size to 32 bits, fill from end to start */ u32 i = ramsize &= ~3; diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c index f1685d9624c8..6269a09c7369 100644 --- a/drivers/net/wan/hd64572.c +++ b/drivers/net/wan/hd64572.c @@ -605,8 +605,7 @@ static netdev_tx_t sca_xmit(struct sk_buff *skb, struct net_device *dev) } -static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase, - u32 ramsize) +static u32 sca_detect_ram(card_t *card, u8 __iomem *rambase, u32 ramsize) { /* Round RAM size to 32 bits, fill from end to start */ u32 i = ramsize &= ~3; diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 0e443fd0803b..7ef435bab425 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c @@ -816,8 +816,7 @@ static const struct net_device_ops lmc_ops = { .ndo_get_stats = lmc_get_stats, }; -static int lmc_init_one(struct pci_dev *pdev, - const struct pci_device_id *ent) +static int lmc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { lmc_softc_t *sc; struct net_device *dev; diff --git a/drivers/net/wan/pc300too.c b/drivers/net/wan/pc300too.c index a51cfa7c6540..53efc57fcace 100644 --- a/drivers/net/wan/pc300too.c +++ b/drivers/net/wan/pc300too.c @@ -298,7 +298,7 @@ static const struct net_device_ops pc300_ops = { }; static int pc300_pci_init_one(struct pci_dev *pdev, - const struct pci_device_id *ent) + const struct pci_device_id *ent) { card_t *card; u32 __iomem *p; diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c index 037c423a6328..ddbce54040e2 100644 --- a/drivers/net/wan/pci200syn.c +++ b/drivers/net/wan/pci200syn.c @@ -277,7 +277,7 @@ static const struct net_device_ops pci200_ops = { }; static int pci200_pci_init_one(struct pci_dev *pdev, - const struct pci_device_id *ent) + const struct pci_device_id *ent) { card_t *card; u32 __iomem *p; diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index b72be1280361..6a24a5a70cc7 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c @@ -558,7 +558,7 @@ static const struct net_device_ops wanxl_ops = { }; static int wanxl_pci_init_one(struct pci_dev *pdev, - const struct pci_device_id *ent) + const struct pci_device_id *ent) { card_t *card; u32 ramsize, stat; -- cgit v1.2.3