From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: linuxppc-dev@ozlabs.org,
Gioele Barabucci <dev@gioelebarabucci.com>,
Olaf Hering <olaf@aepfle.de>
Subject: [PATCH update 2/3] ieee1394: ohci1394: reformat PPC_PMAC platform code
Date: Sat, 11 Nov 2006 00:23:50 +0100 (CET) [thread overview]
Message-ID: <tkrat.210c1fb372b68f41@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.8573138b9ed5f558@s5r6.in-berlin.de>
Adjust whitespace and line lengths
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/ieee1394/ohci1394.c | 34 ++++++++++++++--------------------
1 files changed, 14 insertions(+), 20 deletions(-)
Index: linux/drivers/ieee1394/ohci1394.c
===================================================================
--- linux.orig/drivers/ieee1394/ohci1394.c 2006-11-11 00:12:31.000000000 +0100
+++ linux/drivers/ieee1394/ohci1394.c 2006-11-11 00:13:45.000000000 +0100
@@ -3218,12 +3218,11 @@ static int __devinit ohci1394_pci_probe(
#ifdef CONFIG_PPC_PMAC
/* Necessary on some machines if ohci1394 was loaded/ unloaded before */
if (machine_is(powermac)) {
- struct device_node *of_node = pci_device_to_OF_node(dev);
+ struct device_node *ofn = pci_device_to_OF_node(dev);
- if (of_node) {
- pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, of_node,
- 0, 1);
- pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 1);
+ if (ofn) {
+ pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, ofn, 0, 1);
+ pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 1);
}
}
#endif /* CONFIG_PPC_PMAC */
@@ -3519,12 +3518,11 @@ static void ohci1394_pci_remove(struct p
/* On UniNorth, power down the cable and turn off the chip clock
* to save power on laptops */
{
- struct device_node* of_node;
+ struct device_node* ofn = pci_device_to_OF_node(ohci->dev);
- of_node = pci_device_to_OF_node(ohci->dev);
- if (of_node) {
- pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 0);
- pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, of_node, 0, 0);
+ if (ofn) {
+ pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 0);
+ pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, ofn, 0, 0);
}
}
#endif /* CONFIG_PPC_PMAC */
@@ -3584,12 +3582,10 @@ static int ohci1394_pci_suspend(struct p
/* PowerMac suspend code comes last */
#ifdef CONFIG_PPC_PMAC
if (machine_is(powermac)) {
- struct device_node *of_node;
+ struct device_node *ofn = pci_device_to_OF_node(pdev);
- /* Disable 1394 */
- of_node = pci_device_to_OF_node (pdev);
- if (of_node)
- pmac_call_feature(PMAC_FTR_1394_ENABLE, of_node, 0, 0);
+ if (ofn)
+ pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 0);
}
#endif /* CONFIG_PPC_PMAC */
@@ -3611,12 +3607,10 @@ static int ohci1394_pci_resume(struct pc
/* PowerMac resume code comes first */
#ifdef CONFIG_PPC_PMAC
if (machine_is(powermac)) {
- struct device_node *of_node;
+ struct device_node *ofn = pci_device_to_OF_node(pdev);
- /* Re-enable 1394 */
- of_node = pci_device_to_OF_node (pdev);
- if (of_node)
- pmac_call_feature (PMAC_FTR_1394_ENABLE, of_node, 0, 1);
+ if (ofn)
+ pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 1);
}
#endif /* CONFIG_PPC_PMAC */
next prev parent reply other threads:[~2006-11-10 23:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-05 10:41 [Fwd: [Bug 7431] New: ohci1394 Oops after a rmmod/modprobe cycle] Stefan Richter
2006-11-05 10:54 ` Benjamin Herrenschmidt
2006-11-05 11:22 ` Stefan Richter
2006-11-05 11:37 ` Stefan Richter
2006-11-05 12:59 ` Benjamin Herrenschmidt
2006-11-10 22:43 ` [PATCH 1/2] ieee1394: ohci1394: add PPC_PMAC platform code to driver probe Stefan Richter
2006-11-10 22:44 ` [PATCH 2/2] ieee1394: ohci1394: reformat PPC_PMAC platform code Stefan Richter
2006-11-06 16:58 ` [Fwd: [Bug 7431] New: ohci1394 Oops after a rmmod/modprobe cycle] Olaf Hering
2006-11-06 22:19 ` Benjamin Herrenschmidt
2006-11-07 7:08 ` Olaf Hering
2006-11-07 7:17 ` Benjamin Herrenschmidt
2006-11-10 22:39 ` Stefan Richter
2006-11-10 23:07 ` Stefan Richter
2006-11-10 23:10 ` Benjamin Herrenschmidt
2006-11-10 23:22 ` [PATCH update 1/3] ieee1394: ohci1394: add PPC_PMAC platform code to driver probe Stefan Richter
2006-11-10 23:23 ` Stefan Richter [this message]
2006-11-10 23:26 ` [PATCH update 3/3] ieee1394: ohci1394: call PMac code in shutdown only for proper machines Stefan Richter
2006-11-10 23:55 ` [Fwd: [Bug 7431] New: ohci1394 Oops after a rmmod/modprobe cycle] Stefan Richter
2006-11-11 1:31 ` Benjamin Herrenschmidt
2006-11-13 17:58 ` Olaf Hering
2006-11-13 19:08 ` Stefan Richter
2006-11-14 2:09 ` Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tkrat.210c1fb372b68f41@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=dev@gioelebarabucci.com \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=olaf@aepfle.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).