Commit graph

4 commits

Author SHA1 Message Date
Vaishali Thakkar b11b6ed0f9 net: ec_bhf: Use module_pci_driver
Use module_pci_driver for drivers whose init and exit functions
only register and unregister, respectively.

A simplified version of the Coccinelle semantic patch that performs
this transformation is as follows:

@a@
identifier f, x;
@@
-static f(...) { return pci_register_driver(&x); }

@b depends on a@
identifier e, a.x;
@@
-static e(...) { pci_unregister_driver(&x); }

@c depends on a && b@
identifier a.f;
declarer name module_init;
@@
-module_init(f);

@d depends on a && b && c@
identifier b.e, a.x;
declarer name module_exit;
declarer name module_pci_driver;
@@
-module_exit(e);
+module_pci_driver(x);

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-07-08 16:04:06 -07:00
Darek Marcinkiewicz a9b0b2faa8 net: ec_bhf: remove excessive debug messages
This cuts down the number of debug information spit out by
the driver.

Signed-off-by: Dariusz Marcinkiewicz <reksio@newterm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-24 18:36:57 -07:00
Darek Marcinkiewicz eb02a272c9 driver/net/ethernet/ec_bhf.c: fix sparse warnings
Sparse was reporting quite a few warnings for the driver.
Those get fixed by this patch.

Signed-off-by: Dariusz Marcinkiewicz <reksio@newterm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-14 16:09:33 -04:00
Darek Marcinkiewicz 6af55ff52b Driver for Beckhoff CX5020 EtherCAT master module.
This driver adds support for EtherCAT master module located on CCAT
FPGA found on Beckhoff CX series industrial PCs. The driver exposes
EtherCAT master as an ethernet interface.

EtherCAT is a fieldbus protocol defined on top of ethernet and Beckhoff
CX5020 PCs come with built-in EtherCAT master module located on a FPGA,
which in turn is connected to a PCI bus.

Signed-off-by: Dariusz Marcinkiewicz <reksio@newterm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-08 22:59:25 -04:00