Commit Graph
13 Commits
Author SHA1 Message Date
Wolfram Sang 884df0a314 net: ethernet: amd: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <[email protected]>
2014-10-20 16:21:04 +02:00
Paul Gortmaker a81ab36bf5 drivers/net: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.   Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

This covers everything under drivers/net except for wireless, which
has been submitted separately.

Signed-off-by: Paul Gortmaker <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2014-01-16 11:53:26 -08:00
Jingoo Han 8513fbd880 net: ethernet: use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Also, unnecessary dev_set_drvdata() is removed, because the driver core
clears the driver data to NULL after device_release or on probe failure.

Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2013-05-25 21:27:58 -07:00
Joe Perches d0320f7500 drivers:net: Remove dma_alloc_coherent OOM messages
I believe these error messages are already logged
on allocation failure by warn_alloc_failed and so
get a dump_stack on OOM.

Remove the unnecessary additional error logging.

Around these deletions:

o Alignment neatening.
o Remove unnecessary casts of dma_alloc_coherent.
o Hoist assigns from ifs.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2013-03-15 08:56:58 -04:00
Joe Perches 720a43efd3 drivers:net: Remove unnecessary OOM messages after netdev_alloc_skb
Emitting netdev_alloc_skb and netdev_alloc_skb_ip_align OOM
messages is unnecessary as there is already a dump_stack
after allocation failures.

Other trivial changes around these removals:

Convert a few comparisons of pointer to 0 to !pointer.
Change flow to remove unnecessary label.
Remove now unused variable.
Hoist assignment from if.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2013-03-09 16:09:19 -05:00
Jiri Pirko 7826d43f2d ethtool: fix drvinfo strings set in drivers
Use strlcpy where possible to ensure the string is \0 terminated.
Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN
and custom defines.
Use snprintf instead of sprint.
Remove unnecessary inits of ->fw_version
Remove unnecessary inits of drvinfo struct.

Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2013-01-06 21:06:31 -08:00
Greg Kroah-Hartman 1dd06ae8db 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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2012-12-07 14:22:22 -05:00
Bill Pemberton 0cb0568dfe net/amd: 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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-12-03 11:16:54 -08:00
David Howells 9ffc93f203 Remove all #inclusions of asm/system.h
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it.  Performed with the following command:

perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *`

Signed-off-by: David Howells <[email protected]>
2012-03-28 18:30:03 +01:00
Pradeep A Dalvi 1d26643054 netdev: ethernet dev_alloc_skb to netdev_alloc_skb
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet
  - Removed extra skb->dev = dev after netdev_alloc_skb

Signed-off-by: Pradeep A Dalvi <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2012-02-06 11:41:20 -05:00
Axel Lin db62f684de net/ethernet: convert drivers/net/ethernet/* to use module_platform_driver()
This patch converts the drivers in drivers/net/ethernet/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: "David S. Miller" <[email protected]>
Cc: Pantelis Antoniou <[email protected]>
Cc: Vitaly Bordug <[email protected]>
Cc: Wan ZongShun <[email protected]>
Cc: Nicolas Pitre <[email protected]>
Cc: Giuseppe Cavallaro <[email protected]>
Cc: Marc Kleine-Budde <[email protected]>
Cc: Jeff Kirsher <[email protected]>
Cc: Jiri Pirko <[email protected]>
Cc: Daniel Hellstrom <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Tobias Klauser <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Richard Cochran <[email protected]>
Cc: Jonas Bonn <[email protected]>
Cc: Sebastian Poehn <[email protected]>
Cc: Yoshihiro Shimoda <[email protected]>
Cc: Ricardo Ribalda Delgado <[email protected]>
Cc: "Michał Mirosław" <[email protected]>
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Wan ZongShun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2011-11-29 00:25:05 -05:00
Jiri Pirko afc4b13df1 net: remove use of ndo_set_multicast_list in drivers
replace it by ndo_set_rx_mode

Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2011-08-17 20:22:03 -07:00
Jeff Kirsher b955f6ca77 amd: Move AMD (Lance) chipset drivers
Moves the drivers for the AMD chipsets into drivers/net/ethernet/amd/
and the necessary Kconfig and Makfile changes.

The au1000 (Alchemy) driver was also moved into the same directory
even though it is not a "Lance" driver.

CC: Peter Maydell <[email protected]>
CC: Roman Hodek <[email protected]>
CC: "Maciej W. Rozycki" <[email protected]>
CC: Donald Becker <[email protected]>
CC: Sam Creasey <[email protected]>
CC: Miguel de Icaza <[email protected]>
CC: Thomas Bogendoerfer <[email protected]>
CC: Don Fry <[email protected]>
CC: Geert Uytterhoeven <[email protected]>
CC: Russell King <[email protected]>
CC: David Davies <[email protected]>
CC: "M.Hipp" <[email protected]>
CC: Pete Popov <[email protected]>
CC: David Hinds <[email protected]>
CC: "Roger C. Pao" <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
2011-08-10 19:54:11 -07:00