firewire: ohci: function names cleanup
PATCH 1/3 firewire: ohci: function names cleanup
The ohci_ prefix is only used in function names of fw_card_driver hooks. There are two exceptions which I carelessly added.
Signed-off-by Stefan Richter <[email protected]>
--- drivers/firewire/ohci.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/firewire/ohci.c +9 -9
@@ -2299,7 +2299,7 @@ static const struct fw_card_driver ohci_ };#ifdef CONFIG_PPC_PMAC -static void ohci_pmac_on (struct pci_dev *dev) +static void pmac_ohci_on (struct pci_dev *dev) {if (machine_is (powermac)) {struct device_node *ofn =pci_device_to_OF_node (dev);
@@ -2311,7 +2311,7 @@ static void ohci_pmac_on(struct pci_dev } } -static void ohci_pmac_off (struct pci_dev *dev) +static void pmac_ohci_off (struct pci_dev *dev) {if (machine_is (powermac)) {struct device_node *ofn =pci_device_to_OF_node (dev);
@@ -2323,8 +2323,8 @@ static void ohci_pmac_off(struct pci_dev } }#else -#define ohci_pmac_on (dev) -#define ohci_pmac_off (dev) +#define pmac_ohci_on (dev) +#define pmac_ohci_off (dev)#endif /* CONFIG_PPC_PMAC */ static int __devinit pci_probe(struct pci_dev *dev,
@@ -2344,7 +2344,7 @@ static int __devinit pci_probe(struct pcfw_card_initialize (&ohci->card, &ohci_driver, &dev->dev); -ohci_pmac_on (dev); +pmac_ohci_on (dev); err =pci_enable_device (dev);if (err) {
@@ -2461,7 +2461,7 @@ static int __devinit pci_probe(struct pcpci_disable_device (dev); fail_free:kfree (&ohci->card); -ohci_pmac_off (dev); +pmac_ohci_off (dev); fail:if (err == -ENOMEM )fw_error ("Out of memory\n" );
@@ -2504,7 +2504,7 @@ static void pci_remove(struct pci_dev *dpci_release_region (dev,0 );pci_disable_device (dev);kfree (&ohci->card); -ohci_pmac_off (dev); +pmac_ohci_off (dev);fw_notify ("Removed fw-ohci device.\n" ); }
@@ -2525,7 +2525,7 @@ static int pci_suspend(struct pci_dev *d err =pci_set_power_state (dev,pci_choose_state (dev, state));if (err)fw_error ("pci_set_power_state failed with %d\n" , err); -ohci_pmac_off (dev); +pmac_ohci_off (dev);return 0 ; }
@@ -2535,7 +2535,7 @@ static int pci_resume(struct pci_dev *destruct fw_ohci *ohci =pci_get_drvdata (dev);int err; -ohci_pmac_on (dev); +pmac_ohci_on (dev);pci_set_power_state (dev,PCI_D0 );pci_restore_state (dev); err =pci_enable_device (dev);
Signature · 3 lines
Stefan Richter -=====-==-=- -=-- ---=- http://arcgraph.de/sr/
PATCH 2/3 firewire: ohci: replace empty macros by empty inline functions
so that call parameter type checking is available in #ifndef'd builds.
Signed-off-by Stefan Richter <[email protected]>
--- drivers/firewire/ohci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/firewire/ohci.c +5 -5
@@ -438,9 +438,9 @@ static void log_ar_at_event(char dir, in#else -#define log_irqs (evt) -#define log_selfids (node_id, generation, self_id_count, sid) -#define log_ar_at_event (dir, speed, header, evt) +static inline void log_irqs (u32 evt) {} +static inline void log_selfids (int node_id,int generation,int self_id_count,u32 *s) {} +static inline void log_ar_at_event (char dir,int speed,u32 *header,int evt) {}#endif /* CONFIG_FIREWIRE_OHCI_DEBUG */
@@ -2323,8 +2323,8 @@ static void pmac_ohci_off(struct pci_dev } }#else -#define pmac_ohci_on (dev) -#define pmac_ohci_off (dev) +static inline void pmac_ohci_on (struct pci_dev *dev) {} +static inline void pmac_ohci_off (struct pci_dev *dev) {}#endif /* CONFIG_PPC_PMAC */ static int __devinit pci_probe(struct pci_dev *dev,
Signature · 3 lines
Stefan Richter -=====-==-=- -=-- ---=- http://arcgraph.de/sr/
PATCH 3/3 firewire: ohci: fix nonstandard build without debug facility
CONFIG_FIREWIRE_OHCI_DEBUG is currently a hidden kconfig variable, hence is not going to be switched off by anybody. Still, it can be switched off but then compilation will fail in ohci_enable() at the expression param_debug & OHCI_PARAM_DEBUG_BUSRESETS.
Signed-off-by Stefan Richter <[email protected]>
--- drivers/firewire/ohci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/firewire/ohci.c +3 -2
@@ -259,13 +259,13 @@ MODULE_PARM_DESC(quirks, "Chip quirks (d ", AR/selfID endianess = " __stringify(QUIRK_BE_HEADERS) ")"); -#ifdef CONFIG_FIREWIRE_OHCI_DEBUG -#define OHCI_PARAM_DEBUG_AT_AR 1#define OHCI_PARAM_DEBUG_SELFIDS 2#define OHCI_PARAM_DEBUG_IRQS 4#define OHCI_PARAM_DEBUG_BUSRESETS 8/* only effective before chip init */ +#ifdef CONFIG_FIREWIRE_OHCI_DEBUG +static int param_debug;module_param_named (debug, param_debug, int,0644 ); MODULE_PARM_DESC(debug, "Verbose logging (default = 0"
@@ -438,6 +438,7 @@ static void log_ar_at_event(char dir, in#else +#define param_debug 0static inline void log_irqs (u32 evt) {}static inline void log_selfids (int node_id,int generation,int self_id_count,u32 *s) {}static inline void log_ar_at_event (char dir,int speed,u32 *header,int evt) {}
Signature · 3 lines
Stefan Richter -=====-==-=- -=-- ---=- http://arcgraph.de/sr/