Commit 3fb07877 authored by Russell King's avatar Russell King

[ARM] Fix Acorn SCSI drivers to use ecard_{request,release}_resources

parent 5fdc4ecc
......@@ -286,14 +286,12 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id)
unsigned char *base;
int ret;
resbase = ecard_resource_start(ec, ECARD_RES_MEMC);
reslen = ecard_resource_len(ec, ECARD_RES_MEMC);
if (!request_mem_region(resbase, reslen, "arxescsi")) {
ret = -EBUSY;
ret = ecard_request_resources(ec);
if (ret)
goto out;
}
resbase = ecard_resource_start(ec, ECARD_RES_MEMC);
reslen = ecard_resource_len(ec, ECARD_RES_MEMC);
base = ioremap(resbase, reslen);
if (!base) {
ret = -ENOMEM;
......@@ -345,7 +343,7 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id)
out_unmap:
iounmap(base);
out_region:
release_mem_region(resbase, reslen);
ecard_release_resources(ec);
out:
return ret;
}
......@@ -353,20 +351,15 @@ arxescsi_probe(struct expansion_card *ec, const struct ecard_id *id)
static void __devexit arxescsi_remove(struct expansion_card *ec)
{
struct Scsi_Host *host = ecard_get_drvdata(ec);
unsigned long resbase, reslen;
ecard_set_drvdata(ec, NULL);
fas216_remove(host);
iounmap((void *)host->base);
resbase = ecard_resource_start(ec, ECARD_RES_MEMC);
reslen = ecard_resource_len(ec, ECARD_RES_MEMC);
release_mem_region(resbase, reslen);
fas216_release(host);
scsi_host_put(host);
ecard_release_resources(ec);
}
static const struct ecard_id arxescsi_cids[] = {
......
......@@ -408,14 +408,12 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
unsigned char *base;
int ret;
resbase = ecard_resource_start(ec, ECARD_RES_MEMC);
reslen = ecard_resource_len(ec, ECARD_RES_MEMC);
if (!request_mem_region(resbase, reslen, "cumanascsi2")) {
ret = -EBUSY;
ret = ecard_request_resources(ec);
if (ret)
goto out;
}
resbase = ecard_resource_start(ec, ECARD_RES_MEMC);
reslen = ecard_resource_len(ec, ECARD_RES_MEMC);
base = ioremap(resbase, reslen);
if (!base) {
ret = -ENOMEM;
......@@ -504,7 +502,7 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
iounmap(base);
out_region:
release_mem_region(resbase, reslen);
ecard_release_resources(ec);
out:
return ret;
......@@ -514,7 +512,6 @@ static void __devexit cumanascsi2_remove(struct expansion_card *ec)
{
struct Scsi_Host *host = ecard_get_drvdata(ec);
struct cumanascsi2_info *info = (struct cumanascsi2_info *)host->hostdata;
unsigned long resbase, reslen;
ecard_set_drvdata(ec, NULL);
fas216_remove(host);
......@@ -525,13 +522,9 @@ static void __devexit cumanascsi2_remove(struct expansion_card *ec)
iounmap((void *)host->base);
resbase = ecard_resource_start(ec, ECARD_RES_MEMC);
reslen = ecard_resource_len(ec, ECARD_RES_MEMC);
release_mem_region(resbase, reslen);
fas216_release(host);
scsi_host_put(host);
ecard_release_resources(ec);
}
static const struct ecard_id cumanascsi2_cids[] = {
......
......@@ -525,14 +525,12 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
unsigned char *base;
int ret;
resbase = ecard_resource_start(ec, ECARD_RES_IOCFAST);
reslen = ecard_resource_len(ec, ECARD_RES_IOCFAST);
if (!request_mem_region(resbase, reslen, "eesoxscsi")) {
ret = -EBUSY;
ret = ecard_request_resources(ec);
if (ret)
goto out;
}
resbase = ecard_resource_start(ec, ECARD_RES_IOCFAST);
reslen = ecard_resource_len(ec, ECARD_RES_IOCFAST);
base = ioremap(resbase, reslen);
if (!base) {
ret = -ENOMEM;
......@@ -622,7 +620,7 @@ eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
iounmap(base);
out_region:
release_mem_region(resbase, reslen);
ecard_release_resources(ec);
out:
return ret;
......@@ -632,7 +630,6 @@ static void __devexit eesoxscsi_remove(struct expansion_card *ec)
{
struct Scsi_Host *host = ecard_get_drvdata(ec);
struct eesoxscsi_info *info = (struct eesoxscsi_info *)host->hostdata;
unsigned long resbase, reslen;
ecard_set_drvdata(ec, NULL);
fas216_remove(host);
......@@ -645,13 +642,9 @@ static void __devexit eesoxscsi_remove(struct expansion_card *ec)
iounmap((void *)host->base);
resbase = ecard_resource_start(ec, ECARD_RES_IOCFAST);
reslen = ecard_resource_len(ec, ECARD_RES_IOCFAST);
release_mem_region(resbase, reslen);
fas216_release(host);
scsi_host_put(host);
ecard_release_resources(ec);
}
static const struct ecard_id eesoxscsi_cids[] = {
......
......@@ -318,14 +318,12 @@ powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
unsigned char *base;
int ret;
resbase = ecard_resource_start(ec, ECARD_RES_IOCFAST);
reslen = ecard_resource_len(ec, ECARD_RES_IOCFAST);
if (!request_mem_region(resbase, reslen, "powertecscsi")) {
ret = -EBUSY;
ret = ecard_request_resources(ec);
if (ret)
goto out;
}
resbase = ecard_resource_start(ec, ECARD_RES_IOCFAST);
reslen = ecard_resource_len(ec, ECARD_RES_IOCFAST);
base = ioremap(resbase, reslen);
if (!base) {
ret = -ENOMEM;
......@@ -413,7 +411,7 @@ powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
iounmap(base);
out_region:
release_mem_region(resbase, reslen);
ecard_release_resources(ec);
out:
return ret;
......@@ -423,7 +421,6 @@ static void __devexit powertecscsi_remove(struct expansion_card *ec)
{
struct Scsi_Host *host = ecard_get_drvdata(ec);
struct powertecscsi_info *info = (struct powertecscsi_info *)host->hostdata;
unsigned long resbase, reslen;
ecard_set_drvdata(ec, NULL);
fas216_remove(host);
......@@ -436,13 +433,9 @@ static void __devexit powertecscsi_remove(struct expansion_card *ec)
iounmap((void *)host->base);
resbase = ecard_resource_start(ec, ECARD_RES_IOCFAST);
reslen = ecard_resource_len(ec, ECARD_RES_IOCFAST);
release_mem_region(resbase, reslen);
fas216_release(host);
scsi_host_put(host);
ecard_release_resources(ec);
}
static const struct ecard_id powertecscsi_cids[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment