|
From: <bal...@us...> - 2007-03-19 23:47:38
|
Revision: 927
http://svn.sourceforge.net/hackndev/?rev=927&view=rev
Author: balrog-kun
Date: 2007-03-19 16:47:26 -0700 (Mon, 19 Mar 2007)
Log Message:
-----------
LD: palmld_ide: retabify.
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c 2007-03-19 23:27:48 UTC (rev 926)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_ide.c 2007-03-19 23:47:26 UTC (rev 927)
@@ -17,30 +17,31 @@
static int palmld_ide_probe(struct platform_device *dev)
{
hw_regs_t hw;
- int *hd = NULL;
-
- if(!machine_is_xscale_palmld()) return -ENODEV;
+ int *hd = NULL;
- memset(&hw, 0, sizeof(hw));
+ if (!machine_is_xscale_palmld())
+ return -ENODEV;
- if(!GET_PALMLD_GPIO(IDE_PWEN)) {
- printk(KERN_INFO "palmld_ide_probe: enabling HDD power\n");
- SET_PALMLD_GPIO(IDE_PWEN, 1);
- msleep(300); // fixme: should wait for a ready condition instead of just delaying
- }
+ if (!GET_PALMLD_GPIO(IDE_PWEN)) {
+ printk(KERN_INFO "palmld_ide_probe: enabling HDD power\n");
+ SET_PALMLD_GPIO(IDE_PWEN, 1);
+ /* fixme: should wait for a ready condition instead
+ * of just delaying */
+ msleep(300);
+ }
- ide_std_init_ports(&hw, PALMLD_IDE_VIRT + 0x10, PALMLD_IDE_VIRT + 0xe);
+ ide_std_init_ports(&hw, PALMLD_IDE_VIRT + 0x10, PALMLD_IDE_VIRT + 0xe);
hw.dev = &dev->dev;
- hw.irq = IRQ_GPIO_PALMLD_IDE_IRQ;
- set_irq_type(hw.irq, IRQT_RISING);
+ hw.irq = IRQ_GPIO_PALMLD_IDE_IRQ;
+ set_irq_type(hw.irq, IRQT_RISING);
hd = kmalloc(sizeof(int), GFP_KERNEL);
- *hd = ide_register_hw(&hw, NULL);
+ *hd = ide_register_hw(&hw, NULL);
if(*hd == -1) {
- printk(KERN_ERR "palmld_ide_probe: unable to register ide hw\n");
+ printk(KERN_ERR "palmld_ide_probe: "
+ "unable to register ide hw\n");
kfree(hd);
- hd = NULL;
return -ENODEV;
}
@@ -53,11 +54,11 @@
{
int *hd = platform_get_drvdata(dev);
- if(hd) {
+ if (hd) {
ide_unregister(*hd);
}
- // conserve battery where we can
+ /* conserve battery where we can */
SET_PALMLD_GPIO(IDE_PWEN, 0);
return 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|