#include <linux/platform_device.h>
#include <linux/device.h>
#include <mach/regs-icu.h>
-#include <mach/sram.h>
+ #include <linux/of_device.h>
+#include <linux/platform_data/dma-mmp_tdma.h>
#include "dmaengine.h"
num_chan = max_t(int, pi->pcfg.num_peri, pi->pcfg.num_chan);
pdmac->peripherals = kzalloc(num_chan * sizeof(*pch), GFP_KERNEL);
- goto probe_err5;
+ if (!pdmac->peripherals) {
+ ret = -ENOMEM;
+ dev_err(&adev->dev, "unable to allocate pdmac->peripherals\n");
++ goto probe_err4;
+ }
for (i = 0; i < num_chan; i++) {
pch = &pdmac->peripherals[i];
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/delay.h>
+ #include <linux/dmaengine.h>
#include <linux/dma-mapping.h>
+ #include <linux/edma.h>
#include <linux/mmc/mmc.h>
-#include <mach/mmc.h>
+#include <linux/platform_data/mmc-davinci.h>
- #include <mach/edma.h>
/*
* Register Definitions
#include <linux/spi/spi_bitbang.h>
#include <linux/slab.h>
-#include <mach/spi.h>
+#include <linux/platform_data/spi-davinci.h>
- #include <mach/edma.h>
#define SPI_NO_RESOURCE ((resource_size_t)-1)