Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322890
b: refs/heads/master
c: b18e93a
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and Mark Brown committed Aug 20, 2012
1 parent 5419c87 commit 2d80f35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 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: db8b624d55e65ad5d8211a9fef66fa7f16bd13a0
refs/heads/master: b18e93a493626c1446f9788ebd5844d008bbf71c
25 changes: 5 additions & 20 deletions trunk/sound/soc/ux500/ux500_msp_i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,6 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev,
struct ux500_msp **msp_p,
struct msp_i2s_platform_data *platform_data)
{
int ret = 0;
struct resource *res = NULL;
struct i2s_controller *i2s_cont;
struct ux500_msp *msp;
Expand All @@ -685,15 +684,14 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev,
if (res == NULL) {
dev_err(&pdev->dev, "%s: ERROR: Unable to get resource!\n",
__func__);
ret = -ENOMEM;
goto err_res;
return -ENOMEM;
}

msp->registers = ioremap(res->start, (res->end - res->start + 1));
msp->registers = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
if (msp->registers == NULL) {
dev_err(&pdev->dev, "%s: ERROR: ioremap failed!\n", __func__);
ret = -ENOMEM;
goto err_res;
return -ENOMEM;
}

msp->msp_state = MSP_STATE_IDLE;
Expand All @@ -705,7 +703,7 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev,
dev_err(&pdev->dev,
"%s: ERROR: Failed to allocate I2S-controller!\n",
__func__);
goto err_i2s_cont;
return -ENOMEM;
}
i2s_cont->dev.parent = &pdev->dev;
i2s_cont->data = (void *)msp;
Expand All @@ -716,14 +714,6 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev,
msp->i2s_cont = i2s_cont;

return 0;

err_i2s_cont:
iounmap(msp->registers);

err_res:
devm_kfree(&pdev->dev, msp);

return ret;
}

void ux500_msp_i2s_cleanup_msp(struct platform_device *pdev,
Expand All @@ -732,11 +722,6 @@ void ux500_msp_i2s_cleanup_msp(struct platform_device *pdev,
dev_dbg(msp->dev, "%s: Enter (id = %d).\n", __func__, msp->id);

device_unregister(&msp->i2s_cont->dev);
devm_kfree(&pdev->dev, msp->i2s_cont);

iounmap(msp->registers);

devm_kfree(&pdev->dev, msp);
}

MODULE_LICENSE("GPL v2");

0 comments on commit 2d80f35

Please sign in to comment.