Re: [PATCH 05/15] fbdev: imsttfb: remove the dependency on PPC_OF

From
Stephen Rothwell <hidden>
Date
2015-02-03 02:34:18
Also in
linuxppc-dev
Reply to
Kevin Hao, 2015-02-01
Hi Kevin,

On Sun, 1 Feb 2015 13:51:50 +0800 Kevin Hao [off-list ref] wrote:
That was my first thought, but the codes protected by the PPC_OF seem not
ppc specific and should be safe for other archs which also support OF. So I
drop the PPC_OF completely. Did I miss something?
Ah, ok.
quoted
quoted
 	dp = pci_device_to_OF_node(pdev);
@@ -1478,7 +1477,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		printk(KERN_INFO "%s: OF name %s\n",__func__, dp->name);
 	else
 		printk(KERN_ERR "imsttfb: no OF node for pci device\n");
-#endif /* CONFIG_PPC_OF */
This will emit the above error if CONFIG_OF is not set whereas in the
past it would not.
How about change it to:
	if (IS_ENABLED(CONFIG_OF))
  		printk(KERN_ERR "imsttfb: no OF node for pci device\n");
Looks good.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

Attachments

Thread (6 messages) 6 messages, 2 authors, last reply 2015-02-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help