@@ -521,7 +521,7 @@ struct snd_soc_dai davinci_i2s_dai = {
};
EXPORT_SYMBOL_GPL(davinci_i2s_dai);
-static int davinci_i2s_probe(struct platform_device *pdev)
+static int __devinit davinci_i2s_probe(struct platform_device *pdev)
{
struct snd_platform_data *pdata = pdev->dev.platform_data;
struct davinci_mcbsp_dev *dev;
@@ -534,7 +534,7 @@ static int davinci_i2s_probe(struct platform_device *pdev)
return -ENODEV;
}
- ioarea = request_mem_region(mem->start, (mem->end - mem->start) + 1,
+ ioarea = request_mem_region(mem->start, resource_size(mem),
pdev->name);
if (!ioarea) {
dev_err(&pdev->dev, "McBSP region already claimed\n");
@@ -597,12 +597,12 @@ static int davinci_i2s_probe(struct platform_device *pdev)
err_free_mem:
kfree(dev);
err_release_region:
- release_mem_region(mem->start, (mem->end - mem->start) + 1);
+ release_mem_region(mem->start, resource_size(mem));
return ret;
}
-static int davinci_i2s_remove(struct platform_device *pdev)
+static int __devexit davinci_i2s_remove(struct platform_device *pdev)
{
struct davinci_mcbsp_dev *dev = davinci_i2s_dai.private_data;
struct resource *mem;
@@ -613,14 +613,14 @@ static int davinci_i2s_remove(struct platform_device *pdev)
dev->clk = NULL;
kfree(dev);
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- release_mem_region(mem->start, (mem->end - mem->start) + 1);
+ release_mem_region(mem->start, resource_size(mem));
return 0;
}
static struct platform_driver davinci_mcbsp_driver = {
.probe = davinci_i2s_probe,
- .remove = davinci_i2s_remove,
+ .remove = __devexit_p(davinci_i2s_remove),
.driver = {
.name = "davinci-asp",
.owner = THIS_MODULE,
@@ -844,7 +844,7 @@ struct snd_soc_dai davinci_mcasp_dai[] = {
};
EXPORT_SYMBOL_GPL(davinci_mcasp_dai);
-static int davinci_mcasp_probe(struct platform_device *pdev)
+static int __devinit davinci_mcasp_probe(struct platform_device *pdev)
{
struct davinci_pcm_dma_params *dma_data;
struct resource *mem, *ioarea, *res;
@@ -864,7 +864,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
}
ioarea = request_mem_region(mem->start,
- (mem->end - mem->start) + 1, pdev->name);
+ resource_size(mem), pdev->name);
if (!ioarea) {
dev_err(&pdev->dev, "Audio region already claimed\n");
ret = -EBUSY;
@@ -928,14 +928,14 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
return 0;
err_release_region:
- release_mem_region(mem->start, (mem->end - mem->start) + 1);
+ release_mem_region(mem->start, resource_size(mem));
err_release_data:
kfree(dev);
return ret;
}
-static int davinci_mcasp_remove(struct platform_device *pdev)
+static int __devexit davinci_mcasp_remove(struct platform_device *pdev)
{
struct snd_platform_data *pdata = pdev->dev.platform_data;
struct davinci_audio_dev *dev;
@@ -948,7 +948,7 @@ static int davinci_mcasp_remove(struct platform_device *pdev)
dev->clk = NULL;
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- release_mem_region(mem->start, (mem->end - mem->start) + 1);
+ release_mem_region(mem->start, resource_size(mem));
kfree(dev);
@@ -957,7 +957,7 @@ static int davinci_mcasp_remove(struct platform_device *pdev)
static struct platform_driver davinci_mcasp_driver = {
.probe = davinci_mcasp_probe,
- .remove = davinci_mcasp_remove,
+ .remove = __devexit_p(davinci_mcasp_remove),
.driver = {
.name = "davinci-mcasp",
.owner = THIS_MODULE,