Commit Graph

8 Commits

Author SHA1 Message Date
Németh Márton
13ac58dac0 staging: make PCI device id constant
The id_table field of the struct pci_driver is constant in <linux/pci.h>
so it is worth to make the initialization data also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
	struct I1 {
	  ...
	  const struct I2 *x;
	  ...
	};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
	struct I1 y = {
	  .x = E,
	};
@c@
identifier r.I2;
identifier s.E;
@@
	const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+	const
	struct I2 E[] = ...;
// </smpl>

Signed-off-by: Németh Márton <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:42 -08:00
Peter Huewe
73d3f6652a Staging: phison: adding __init/__exit macros
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of drivers/staging/phison/phison.c

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:05 -08:00
Randy Dunlap
3bfd058363 Staging: phison: depends on PCI
phison uses PCI interfaces, so it should depend on PCI.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Evan Ko <evan_ko@phison.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:40 -07:00
Randy Dunlap
1cc41726fd Staging: phison: fix kconfig for clean build
phison is an ATA driver, not a classic IDE driver, so fix the Kconfig file
so that it will build.

drivers/staging/phison/phison.c:43: error: implicit declaration of function 'ATA_BMDMA_SHT'
drivers/staging/phison/phison.c:43: error: initializer element is not constant
drivers/staging/phison/phison.c:43: error: (near initialization for 'phison_sht.module')
drivers/staging/phison/phison.c:47: error: 'ata_bmdma_port_ops' undeclared here (not in a function)
drivers/staging/phison/phison.c:65: error: implicit declaration of function 'ata_pci_sff_init_one'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:40 -07:00
Greg Kroah-Hartman
301df5dce4 Staging: phison: add driver to the build system
Cc: Evan Ko <evan_ko@phison.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:40 -07:00
Greg Kroah-Hartman
76d86df9c4 Staging: phison: port code to work properly with latest libata
This brings the driver up to modern times so that it can build and run
properly with the in-tree libata code.

Cc: Evan Ko <evan_ko@phison.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:40 -07:00
Greg Kroah-Hartman
33210206b6 Staging: phison: fix up checkpatch and other formatting issues
Minor touchups to fix up the coding style issues in the phison driver.

Cc: Evan Ko <evan_ko@phison.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:40 -07:00
Evan Ko
cfc2f947f8 Staging: add phison ATA driver to the tree
It doesn't build properly yet as it is against an older kernel version.
That will be fixed up in patches following this.

From: Evan Ko <evan_ko@phison.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:40 -07:00