Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Aug 2010 16:11:31 +0000 (09:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Aug 2010 16:11:31 +0000 (09:11 -0700)
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
  mmc_spi: Fix unterminated of_match_table
  of/sparc: fix build regression from of_device changes
  of/device: Replace struct of_device with struct platform_device

1  2 
drivers/ata/sata_fsl.c
drivers/block/xsysace.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/edac/mpc85xx_edac.c
drivers/infiniband/hw/ehca/ehca_main.c
drivers/mmc/host/sdhci-of-core.c
drivers/mtd/maps/physmap_of.c
drivers/pcmcia/m8xx_pcmcia.c
sound/soc/fsl/mpc5200_psc_ac97.c
sound/soc/fsl/mpc5200_psc_i2s.c

diff --combined drivers/ata/sata_fsl.c
index 18c986dbb7f145cbd04399e313029d71dae3a459,4e4d42f1186adbfb1754efc3ec771b0e39924e89..7325f77480dcb77296d148f8566bd64148a4cf3e
@@@ -1096,7 -1096,7 +1096,7 @@@ static void sata_fsl_host_intr(struct a
  {
        struct sata_fsl_host_priv *host_priv = ap->host->private_data;
        void __iomem *hcr_base = host_priv->hcr_base;
 -      u32 hstatus, qc_active = 0;
 +      u32 hstatus, done_mask = 0;
        struct ata_queued_cmd *qc;
        u32 SError;
  
        }
  
        /* Read command completed register */
 -      qc_active = ioread32(hcr_base + CC);
 +      done_mask = ioread32(hcr_base + CC);
  
        VPRINTK("Status of all queues :\n");
 -      VPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n",
 -              qc_active,
 +      VPRINTK("done_mask/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n",
 +              done_mask,
                ioread32(hcr_base + CA),
                ioread32(hcr_base + CE),
                ioread32(hcr_base + CQ),
                ap->qc_active);
  
 -      if (qc_active & ap->qc_active) {
 +      if (done_mask & ap->qc_active) {
                int i;
                /* clear CC bit, this will also complete the interrupt */
 -              iowrite32(qc_active, hcr_base + CC);
 +              iowrite32(done_mask, hcr_base + CC);
  
                DPRINTK("Status of all queues :\n");
 -              DPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x\n",
 -                      qc_active, ioread32(hcr_base + CA),
 +              DPRINTK("done_mask/CC = 0x%x, CA = 0x%x, CE=0x%x\n",
 +                      done_mask, ioread32(hcr_base + CA),
                        ioread32(hcr_base + CE));
  
                for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) {
 -                      if (qc_active & (1 << i)) {
 +                      if (done_mask & (1 << i)) {
                                qc = ata_qc_from_tag(ap, i);
                                if (qc) {
                                        ata_qc_complete(qc);
                /* Spurious Interrupt!! */
                DPRINTK("spurious interrupt!!, CC = 0x%x\n",
                        ioread32(hcr_base + CC));
 -              iowrite32(qc_active, hcr_base + CC);
 +              iowrite32(done_mask, hcr_base + CC);
                return;
        }
  }
@@@ -1296,7 -1296,7 +1296,7 @@@ static const struct ata_port_info sata_
         },
  };
  
- static int sata_fsl_probe(struct of_device *ofdev,
+ static int sata_fsl_probe(struct platform_device *ofdev,
                        const struct of_device_id *match)
  {
        int retval = -ENXIO;
@@@ -1370,7 -1370,7 +1370,7 @@@ error_exit_with_cleanup
        return retval;
  }
  
- static int sata_fsl_remove(struct of_device *ofdev)
+ static int sata_fsl_remove(struct platform_device *ofdev)
  {
        struct ata_host *host = dev_get_drvdata(&ofdev->dev);
        struct sata_fsl_host_priv *host_priv = host->private_data;
  }
  
  #ifdef CONFIG_PM
- static int sata_fsl_suspend(struct of_device *op, pm_message_t state)
+ static int sata_fsl_suspend(struct platform_device *op, pm_message_t state)
  {
        struct ata_host *host = dev_get_drvdata(&op->dev);
        return ata_host_suspend(host, state);
  }
  
- static int sata_fsl_resume(struct of_device *op)
+ static int sata_fsl_resume(struct platform_device *op)
  {
        struct ata_host *host = dev_get_drvdata(&op->dev);
        struct sata_fsl_host_priv *host_priv = host->private_data;
diff --combined drivers/block/xsysace.c
index b71888b909a0e43dea2ad8cf36faffb1de27701b,d7cb69db3067db73bdfd2aa23bbec2fbd14d9320..2982b3ee9465d1521a6296186c52be9c3a8dc462
@@@ -89,7 -89,6 +89,7 @@@
  #include <linux/delay.h>
  #include <linux/slab.h>
  #include <linux/blkdev.h>
 +#include <linux/smp_lock.h>
  #include <linux/ata.h>
  #include <linux/hdreg.h>
  #include <linux/platform_device.h>
@@@ -466,7 -465,7 +466,7 @@@ struct request *ace_get_next_request(st
        struct request *req;
  
        while ((req = blk_peek_request(q)) != NULL) {
 -              if (blk_fs_request(req))
 +              if (req->cmd_type == REQ_TYPE_FS)
                        break;
                blk_start_request(req);
                __blk_end_request_all(req, -EIO);
@@@ -902,14 -901,11 +902,14 @@@ static int ace_open(struct block_devic
  
        dev_dbg(ace->dev, "ace_open() users=%i\n", ace->users + 1);
  
 +      lock_kernel();
        spin_lock_irqsave(&ace->lock, flags);
        ace->users++;
        spin_unlock_irqrestore(&ace->lock, flags);
  
        check_disk_change(bdev);
 +      unlock_kernel();
 +
        return 0;
  }
  
@@@ -921,7 -917,6 +921,7 @@@ static int ace_release(struct gendisk *
  
        dev_dbg(ace->dev, "ace_release() users=%i\n", ace->users - 1);
  
 +      lock_kernel();
        spin_lock_irqsave(&ace->lock, flags);
        ace->users--;
        if (ace->users == 0) {
                ace_out(ace, ACE_CTRL, val & ~ACE_CTRL_LOCKREQ);
        }
        spin_unlock_irqrestore(&ace->lock, flags);
 +      unlock_kernel();
        return 0;
  }
  
@@@ -1194,7 -1188,7 +1194,7 @@@ static struct platform_driver ace_platf
  
  #if defined(CONFIG_OF)
  static int __devinit
- ace_of_probe(struct of_device *op, const struct of_device_id *match)
+ ace_of_probe(struct platform_device *op, const struct of_device_id *match)
  {
        struct resource res;
        resource_size_t physaddr;
        return ace_alloc(&op->dev, id ? *id : 0, physaddr, irq, bus_width);
  }
  
- static int __devexit ace_of_remove(struct of_device *op)
+ static int __devexit ace_of_remove(struct platform_device *op)
  {
        ace_free(&op->dev);
        return 0;
index 48330e0fd488f241fa267b23484b5357e8aefc12,b532d613fb5bf0b7b5af8e20c44d81e7200607d4..3822b4f49c84a360145a085e329fe0b76df4d47c
@@@ -1804,12 -1804,9 +1804,12 @@@ static int hotmod_handler(const char *v
                                info->irq_setup = std_irq_setup;
                        info->slave_addr = ipmb;
  
 -                      if (!add_smi(info))
 +                      if (!add_smi(info)) {
                                if (try_smi_init(info))
                                        cleanup_one_si(info);
 +                      } else {
 +                              kfree(info);
 +                      }
                } else {
                        /* remove */
                        struct smi_info *e, *tmp_e;
@@@ -1893,12 -1890,9 +1893,12 @@@ static __devinit void hardcode_find_bmc
                        info->irq_setup = std_irq_setup;
                info->slave_addr = slave_addrs[i];
  
 -              if (!add_smi(info))
 +              if (!add_smi(info)) {
                        if (try_smi_init(info))
                                cleanup_one_si(info);
 +              } else {
 +                      kfree(info);
 +              }
        }
  }
  
@@@ -1971,8 -1965,8 +1971,8 @@@ static int acpi_gpe_irq_setup(struct sm
  
  /*
   * Defined at
 - * http://h21007.www2.hp.com/dspp/files/unprotected/devresource/
 - * Docs/TechPapers/IA64/hpspmi.pdf
 + * http://h21007.www2.hp.com/portal/download/files
 + * /unprot/hpspmi.pdf
   */
  struct SPMITable {
        s8      Signature[4];
  static __devinit int try_init_spmi(struct SPMITable *spmi)
  {
        struct smi_info  *info;
 -      u8               addr_space;
  
        if (spmi->IPMIlegacy != 1) {
                printk(KERN_INFO PFX "Bad SPMI legacy %d\n", spmi->IPMIlegacy);
                return -ENODEV;
        }
  
 -      if (spmi->addr.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
 -              addr_space = IPMI_MEM_ADDR_SPACE;
 -      else
 -              addr_space = IPMI_IO_ADDR_SPACE;
 -
        info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (!info) {
                printk(KERN_ERR PFX "Could not allocate SI data (3)\n");
        }
        info->io.addr_data = spmi->addr.address;
  
 -      add_smi(info);
 +      pr_info("ipmi_si: SPMI: %s %#lx regsize %d spacing %d irq %d\n",
 +               (info->io.addr_type == IPMI_IO_ADDR_SPACE) ? "io" : "mem",
 +               info->io.addr_data, info->io.regsize, info->io.regspacing,
 +               info->irq);
 +
 +      if (add_smi(info))
 +              kfree(info);
  
        return 0;
  }
@@@ -2182,14 -2176,6 +2182,14 @@@ static int __devinit ipmi_pnp_probe(str
        info->io.addr_data = res->start;
  
        info->io.regspacing = DEFAULT_REGSPACING;
 +      res = pnp_get_resource(dev,
 +                             (info->io.addr_type == IPMI_IO_ADDR_SPACE) ?
 +                                      IORESOURCE_IO : IORESOURCE_MEM,
 +                             1);
 +      if (res) {
 +              if (res->start > info->io.addr_data)
 +                      info->io.regspacing = res->start - info->io.addr_data;
 +      }
        info->io.regsize = DEFAULT_REGSPACING;
        info->io.regshift = 0;
  
                 res, info->io.regsize, info->io.regspacing,
                 info->irq);
  
 -      return add_smi(info);
 +      if (add_smi(info))
 +              goto err_free;
 +
 +      return 0;
  
  err_free:
        kfree(info);
@@@ -2371,13 -2354,7 +2371,13 @@@ static __devinit void try_init_dmi(stru
        if (info->irq)
                info->irq_setup = std_irq_setup;
  
 -      add_smi(info);
 +      pr_info("ipmi_si: SMBIOS: %s %#lx regsize %d spacing %d irq %d\n",
 +               (info->io.addr_type == IPMI_IO_ADDR_SPACE) ? "io" : "mem",
 +               info->io.addr_data, info->io.regsize, info->io.regspacing,
 +               info->irq);
 +
 +      if (add_smi(info))
 +              kfree(info);
  }
  
  static void __devinit dmi_find_bmc(void)
@@@ -2483,10 -2460,7 +2483,10 @@@ static int __devinit ipmi_pci_probe(str
                &pdev->resource[0], info->io.regsize, info->io.regspacing,
                info->irq);
  
 -      return add_smi(info);
 +      if (add_smi(info))
 +              kfree(info);
 +
 +      return 0;
  }
  
  static void __devexit ipmi_pci_remove(struct pci_dev *pdev)
@@@ -2528,7 -2502,7 +2528,7 @@@ static struct pci_driver ipmi_pci_drive
  
  
  #ifdef CONFIG_PPC_OF
- static int __devinit ipmi_of_probe(struct of_device *dev,
+ static int __devinit ipmi_of_probe(struct platform_device *dev,
                         const struct of_device_id *match)
  {
        struct smi_info *info;
  
        dev_set_drvdata(&dev->dev, info);
  
 -      return add_smi(info);
 +      if (add_smi(info)) {
 +              kfree(info);
 +              return -EBUSY;
 +      }
 +
 +      return 0;
  }
  
- static int __devexit ipmi_of_remove(struct of_device *dev)
+ static int __devexit ipmi_of_remove(struct platform_device *dev)
  {
        cleanup_one_si(dev_get_drvdata(&dev->dev));
        return 0;
@@@ -3037,8 -3006,6 +3037,8 @@@ static __devinit void default_find_bmc(
                                info->io.addr_data);
                        } else
                                cleanup_one_si(info);
 +              } else {
 +                      kfree(info);
                }
        }
  }
@@@ -3066,7 -3033,7 +3066,7 @@@ static int add_smi(struct smi_info *new
                        si_to_str[new_smi->si_type]);
        mutex_lock(&smi_infos_lock);
        if (!is_new_interface(new_smi)) {
 -              printk(KERN_CONT PFX "duplicate interface\n");
 +              printk(KERN_CONT duplicate interface\n");
                rv = -EBUSY;
                goto out_err;
        }
index af75e27f5224c72b2dd5c656cf3ab3efd6f23c98,8ea07b01954323c1c7995803c224ddac459eec7d..b123bb308a4a8b50c7543179e065bc34ef2a33ff
@@@ -43,7 -43,7 +43,7 @@@ static u32 orig_pci_err_en
  #endif
  
  static u32 orig_l2_err_disable;
 -#ifdef CONFIG_MPC85xx
 +#ifdef CONFIG_FSL_SOC_BOOKE
  static u32 orig_hid1[2];
  #endif
  
@@@ -200,7 -200,7 +200,7 @@@ static irqreturn_t mpc85xx_pci_isr(int 
        return IRQ_HANDLED;
  }
  
- static int __devinit mpc85xx_pci_err_probe(struct of_device *op,
+ static int __devinit mpc85xx_pci_err_probe(struct platform_device *op,
                                           const struct of_device_id *match)
  {
        struct edac_pci_ctl_info *pci;
@@@ -305,7 -305,7 +305,7 @@@ err
        return res;
  }
  
- static int mpc85xx_pci_err_remove(struct of_device *op)
+ static int mpc85xx_pci_err_remove(struct platform_device *op)
  {
        struct edac_pci_ctl_info *pci = dev_get_drvdata(&op->dev);
        struct mpc85xx_pci_pdata *pdata = pci->pvt_info;
@@@ -503,7 -503,7 +503,7 @@@ static irqreturn_t mpc85xx_l2_isr(int i
        return IRQ_HANDLED;
  }
  
- static int __devinit mpc85xx_l2_err_probe(struct of_device *op,
+ static int __devinit mpc85xx_l2_err_probe(struct platform_device *op,
                                          const struct of_device_id *match)
  {
        struct edac_device_ctl_info *edac_dev;
@@@ -613,7 -613,7 +613,7 @@@ err
        return res;
  }
  
- static int mpc85xx_l2_err_remove(struct of_device *op)
+ static int mpc85xx_l2_err_remove(struct platform_device *op)
  {
        struct edac_device_ctl_info *edac_dev = dev_get_drvdata(&op->dev);
        struct mpc85xx_l2_pdata *pdata = edac_dev->pvt_info;
@@@ -647,10 -647,7 +647,10 @@@ static struct of_device_id mpc85xx_l2_e
        { .compatible = "fsl,mpc8555-l2-cache-controller", },
        { .compatible = "fsl,mpc8560-l2-cache-controller", },
        { .compatible = "fsl,mpc8568-l2-cache-controller", },
 +      { .compatible = "fsl,mpc8569-l2-cache-controller", },
        { .compatible = "fsl,mpc8572-l2-cache-controller", },
 +      { .compatible = "fsl,p1020-l2-cache-controller", },
 +      { .compatible = "fsl,p1021-l2-cache-controller", },
        { .compatible = "fsl,p2020-l2-cache-controller", },
        {},
  };
@@@ -956,7 -953,7 +956,7 @@@ static void __devinit mpc85xx_init_csro
        }
  }
  
- static int __devinit mpc85xx_mc_err_probe(struct of_device *op,
+ static int __devinit mpc85xx_mc_err_probe(struct platform_device *op,
                                          const struct of_device_id *match)
  {
        struct mem_ctl_info *mci;
@@@ -1088,7 -1085,7 +1088,7 @@@ err
        return res;
  }
  
- static int mpc85xx_mc_err_remove(struct of_device *op)
+ static int mpc85xx_mc_err_remove(struct platform_device *op)
  {
        struct mem_ctl_info *mci = dev_get_drvdata(&op->dev);
        struct mpc85xx_mc_pdata *pdata = mci->pvt_info;
@@@ -1128,10 -1125,7 +1128,10 @@@ static struct of_device_id mpc85xx_mc_e
        { .compatible = "fsl,mpc8569-memory-controller", },
        { .compatible = "fsl,mpc8572-memory-controller", },
        { .compatible = "fsl,mpc8349-memory-controller", },
 +      { .compatible = "fsl,p1020-memory-controller", },
 +      { .compatible = "fsl,p1021-memory-controller", },
        { .compatible = "fsl,p2020-memory-controller", },
 +      { .compatible = "fsl,p4080-memory-controller", },
        {},
  };
  MODULE_DEVICE_TABLE(of, mpc85xx_mc_err_of_match);
@@@ -1146,7 -1140,7 +1146,7 @@@ static struct of_platform_driver mpc85x
        },
  };
  
 -#ifdef CONFIG_MPC85xx
 +#ifdef CONFIG_FSL_SOC_BOOKE
  static void __init mpc85xx_mc_clear_rfxe(void *data)
  {
        orig_hid1[smp_processor_id()] = mfspr(SPRN_HID1);
@@@ -1185,7 -1179,7 +1185,7 @@@ static int __init mpc85xx_mc_init(void
                printk(KERN_WARNING EDAC_MOD_STR "PCI fails to register\n");
  #endif
  
 -#ifdef CONFIG_MPC85xx
 +#ifdef CONFIG_FSL_SOC_BOOKE
        /*
         * need to clear HID1[RFXE] to disable machine check int
         * so we can catch it
  
  module_init(mpc85xx_mc_init);
  
 -#ifdef CONFIG_MPC85xx
 +#ifdef CONFIG_FSL_SOC_BOOKE
  static void __exit mpc85xx_mc_restore_hid1(void *data)
  {
        mtspr(SPRN_HID1, orig_hid1[smp_processor_id()]);
  
  static void __exit mpc85xx_mc_exit(void)
  {
 -#ifdef CONFIG_MPC85xx
 +#ifdef CONFIG_FSL_SOC_BOOKE
        on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0);
  #endif
  #ifdef CONFIG_PCI
index cfc4de7a5da4700b6b0b74f6010f63ff878208c5,67c4534fb94196af2a04b33bbcd181f1264662bc..c240e9972cb0e52c2f2789f48e1e4c9ab6cbb29d
@@@ -360,8 -360,7 +360,8 @@@ static int ehca_sense_attributes(struc
         * a firmware property, so it's valid across all adapters
         */
        if (ehca_lock_hcalls == -1)
 -              ehca_lock_hcalls = !(shca->hca_cap & HCA_CAP_H_ALLOC_RES_SYNC);
 +              ehca_lock_hcalls = !EHCA_BMASK_GET(HCA_CAP_H_ALLOC_RES_SYNC,
 +                                      shca->hca_cap);
  
        /* translate supported MR page sizes; always support 4K */
        shca->hca_cap_mr_pgsize = EHCA_PAGESIZE;
@@@ -713,7 -712,7 +713,7 @@@ static struct attribute_group ehca_dev_
        .attrs = ehca_dev_attrs
  };
  
- static int __devinit ehca_probe(struct of_device *dev,
+ static int __devinit ehca_probe(struct platform_device *dev,
                                const struct of_device_id *id)
  {
        struct ehca_shca *shca;
@@@ -879,7 -878,7 +879,7 @@@ probe1
        return -EINVAL;
  }
  
- static int __devexit ehca_remove(struct of_device *dev)
+ static int __devexit ehca_remove(struct platform_device *dev)
  {
        struct ehca_shca *shca = dev_get_drvdata(&dev->dev);
        unsigned long flags;
index dd1bdd168e669b934098dca1a9a1d9ee52a03263,a6bd448a3b46eb7e8b7cfd3443e6e37ceec056ea..c51b71174c1de1df6dce05482d8b2eb13b4d519e
@@@ -85,14 -85,14 +85,14 @@@ void sdhci_be32bs_writeb(struct sdhci_h
  
  #ifdef CONFIG_PM
  
- static int sdhci_of_suspend(struct of_device *ofdev, pm_message_t state)
+ static int sdhci_of_suspend(struct platform_device *ofdev, pm_message_t state)
  {
        struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
  
        return mmc_suspend_host(host->mmc);
  }
  
- static int sdhci_of_resume(struct of_device *ofdev)
+ static int sdhci_of_resume(struct platform_device *ofdev)
  {
        struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
  
@@@ -115,7 -115,7 +115,7 @@@ static bool __devinit sdhci_of_wp_inver
        return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds);
  }
  
- static int __devinit sdhci_of_probe(struct of_device *ofdev,
+ static int __devinit sdhci_of_probe(struct platform_device *ofdev,
                                 const struct of_device_id *match)
  {
        struct device_node *np = ofdev->dev.of_node;
                host->ops = &sdhci_of_data->ops;
        }
  
 +      if (of_get_property(np, "sdhci,auto-cmd12", NULL))
 +              host->quirks |= SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12;
 +
 +
        if (of_get_property(np, "sdhci,1-bit-only", NULL))
                host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA;
  
@@@ -183,7 -179,7 +183,7 @@@ err_addr_map
        return ret;
  }
  
- static int __devexit sdhci_of_remove(struct of_device *ofdev)
+ static int __devexit sdhci_of_remove(struct platform_device *ofdev)
  {
        struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
  
index 6ac5f9f28ac3a9083b36411eb6a7518561976c58,8f9bab8dc8da32426dee85e244dd78ff3b5262a8..00af55d7afba60785b61b011814aba2e46a6f0df
@@@ -43,7 -43,7 +43,7 @@@ struct of_flash 
  #ifdef CONFIG_MTD_PARTITIONS
  #define OF_FLASH_PARTS(info)  ((info)->parts)
  
- static int parse_obsolete_partitions(struct of_device *dev,
+ static int parse_obsolete_partitions(struct platform_device *dev,
                                     struct of_flash *info,
                                     struct device_node *dp)
  {
@@@ -93,7 -93,7 +93,7 @@@
  #define parse_partitions(info, dev)   (0)
  #endif /* MTD_PARTITIONS */
  
- static int of_flash_remove(struct of_device *dev)
+ static int of_flash_remove(struct platform_device *dev)
  {
        struct of_flash *info;
        int i;
  /* Helper function to handle probing of the obsolete "direct-mapped"
   * compatible binding, which has an extra "probe-type" property
   * describing the type of flash probe necessary. */
- static struct mtd_info * __devinit obsolete_probe(struct of_device *dev,
+ static struct mtd_info * __devinit obsolete_probe(struct platform_device *dev,
                                                  struct map_info *map)
  {
        struct device_node *dp = dev->dev.of_node;
@@@ -215,7 -215,7 +215,7 @@@ static void __devinit of_free_probes(co
  }
  #endif
  
- static int __devinit of_flash_probe(struct of_device *dev,
+ static int __devinit of_flash_probe(struct platform_device *dev,
                                    const struct of_device_id *match)
  {
  #ifdef CONFIG_MTD_PARTITIONS
                                   &info->parts, 0);
        if (err < 0) {
                of_free_probes(part_probe_types);
 -              return err;
 +              goto err_out;
        }
        of_free_probes(part_probe_types);
  
        if (err == 0) {
                err = of_mtd_parse_partitions(&dev->dev, dp, &info->parts);
                if (err < 0)
 -                      return err;
 +                      goto err_out;
        }
  #endif
  
        if (err == 0) {
                err = parse_obsolete_partitions(dev, info, dp);
                if (err < 0)
 -                      return err;
 +                      goto err_out;
        }
  
        if (err > 0)
index f2f90a7d3e12279b0684dfc903a95ae2ed2c6893,84a70a59ef95fdf16dba44962d871abedad6d0af..f0ecad99ce819d0af8ac77467e2bce332bdc7bc8
@@@ -59,6 -59,7 +59,6 @@@
  #include <asm/irq.h>
  #include <asm/fs_pd.h>
  
 -#include <pcmcia/cs_types.h>
  #include <pcmcia/cs.h>
  #include <pcmcia/ss.h>
  
@@@ -1149,7 -1150,7 +1149,7 @@@ static struct pccard_operations m8xx_se
        .set_mem_map = m8xx_set_mem_map,
  };
  
- static int __init m8xx_probe(struct of_device *ofdev,
+ static int __init m8xx_probe(struct platform_device *ofdev,
                             const struct of_device_id *match)
  {
        struct pcmcia_win *w;
        return 0;
  }
  
- static int m8xx_remove(struct of_device *ofdev)
+ static int m8xx_remove(struct platform_device *ofdev)
  {
        u32 m, i;
        struct pcmcia_win *w;
index e7f5d50ed0843abf3f81e2d1b5a8ce1655c0f372,a0310170a170bf32181e87330bef8d5365647ffd..a9560235daeee3d4260d6066f9951bc89aa5ab4f
@@@ -20,7 -20,6 +20,7 @@@
  
  #include <asm/time.h>
  #include <asm/delay.h>
 +#include <asm/mpc52xx.h>
  #include <asm/mpc52xx_psc.h>
  
  #include "mpc5200_dma.h"
@@@ -101,32 -100,19 +101,32 @@@ static void psc_ac97_warm_reset(struct 
  {
        struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs;
  
 +      mutex_lock(&psc_dma->mutex);
 +
        out_be32(&regs->sicr, psc_dma->sicr | MPC52xx_PSC_SICR_AWR);
        udelay(3);
        out_be32(&regs->sicr, psc_dma->sicr);
 +
 +      mutex_unlock(&psc_dma->mutex);
  }
  
  static void psc_ac97_cold_reset(struct snd_ac97 *ac97)
  {
        struct mpc52xx_psc __iomem *regs = psc_dma->psc_regs;
  
 -      /* Do a cold reset */
 -      out_8(&regs->op1, MPC52xx_PSC_OP_RES);
 -      udelay(10);
 -      out_8(&regs->op0, MPC52xx_PSC_OP_RES);
 +      mutex_lock(&psc_dma->mutex);
 +      dev_dbg(psc_dma->dev, "cold reset\n");
 +
 +      mpc5200_psc_ac97_gpio_reset(psc_dma->id);
 +
 +      /* Notify the PSC that a reset has occurred */
 +      out_be32(&regs->sicr, psc_dma->sicr | MPC52xx_PSC_SICR_ACRB);
 +
 +      /* Re-enable RX and TX */
 +      out_8(&regs->command, MPC52xx_PSC_TX_ENABLE | MPC52xx_PSC_RX_ENABLE);
 +
 +      mutex_unlock(&psc_dma->mutex);
 +
        msleep(1);
        psc_ac97_warm_reset(ac97);
  }
@@@ -277,7 -263,7 +277,7 @@@ EXPORT_SYMBOL_GPL(psc_ac97_dai)
   * - Probe/remove operations
   * - OF device match table
   */
- static int __devinit psc_ac97_of_probe(struct of_device *op,
+ static int __devinit psc_ac97_of_probe(struct platform_device *op,
                                      const struct of_device_id *match)
  {
        int rc, i;
        return 0;
  }
  
- static int __devexit psc_ac97_of_remove(struct of_device *op)
+ static int __devexit psc_ac97_of_remove(struct platform_device *op)
  {
        return mpc5200_audio_dma_destroy(op);
  }
index 676841cbae9895a21fbcc15aa34ddef0a8c27c96,9aee748eca7d2df86188333a4cb1865c775d312b..534f04cb15d7d1df602b4d8a3e65c962d93ad845
@@@ -16,6 -16,7 +16,6 @@@
  
  #include <asm/mpc52xx_psc.h>
  
 -#include "mpc5200_psc_i2s.h"
  #include "mpc5200_dma.h"
  
  /**
@@@ -152,7 -153,7 +152,7 @@@ EXPORT_SYMBOL_GPL(psc_i2s_dai)
   * - Probe/remove operations
   * - OF device match table
   */
- static int __devinit psc_i2s_of_probe(struct of_device *op,
+ static int __devinit psc_i2s_of_probe(struct platform_device *op,
                                      const struct of_device_id *match)
  {
        int rc;
  
  }
  
- static int __devexit psc_i2s_of_remove(struct of_device *op)
+ static int __devexit psc_i2s_of_remove(struct platform_device *op)
  {
        return mpc5200_audio_dma_destroy(op);
  }