Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313361
b: refs/heads/master
c: b1ec430
h: refs/heads/master
i:
  313359: d401ff5
v: v3
  • Loading branch information
Mark Brown authored and Kukjin Kim committed Jul 19, 2012
1 parent 0ab0f6e commit c4b1c1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 707214d097eb505fe067668838ae800260a064ba
refs/heads/master: b1ec43084d9b53dadae64da00532e1c02444ef2c
18 changes: 1 addition & 17 deletions trunk/drivers/spi/spi-s3c64xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1280,14 +1280,7 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
/* the spi->mode bits understood by this driver: */
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;

if (request_mem_region(mem_res->start,
resource_size(mem_res), pdev->name) == NULL) {
dev_err(&pdev->dev, "Req mem region failed\n");
ret = -ENXIO;
goto err0;
}

sdd->regs = ioremap(mem_res->start, resource_size(mem_res));
sdd->regs = devm_request_and_ioremap(&pdev->dev, mem_res);
if (sdd->regs == NULL) {
dev_err(&pdev->dev, "Unable to remap IO\n");
ret = -ENXIO;
Expand Down Expand Up @@ -1381,9 +1374,7 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
if (!sdd->cntrlr_info->cfg_gpio && pdev->dev.of_node)
s3c64xx_spi_dt_gpio_free(sdd);
err2:
iounmap((void *) sdd->regs);
err1:
release_mem_region(mem_res->start, resource_size(mem_res));
err0:
platform_set_drvdata(pdev, NULL);
spi_master_put(master);
Expand All @@ -1395,7 +1386,6 @@ static int s3c64xx_spi_remove(struct platform_device *pdev)
{
struct spi_master *master = spi_master_get(platform_get_drvdata(pdev));
struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
struct resource *mem_res;

pm_runtime_disable(&pdev->dev);

Expand All @@ -1414,12 +1404,6 @@ static int s3c64xx_spi_remove(struct platform_device *pdev)
if (!sdd->cntrlr_info->cfg_gpio && pdev->dev.of_node)
s3c64xx_spi_dt_gpio_free(sdd);

iounmap((void *) sdd->regs);

mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (mem_res != NULL)
release_mem_region(mem_res->start, resource_size(mem_res));

platform_set_drvdata(pdev, NULL);
spi_master_put(master);

Expand Down

0 comments on commit c4b1c1a

Please sign in to comment.