Skip to content

Commit

Permalink
ARM: 7905/1: etm: Remove unnecessary amba_set_drvdata()
Browse files Browse the repository at this point in the history
Driver core clears the driver data to NULL after device_release
or on probe failure, so just remove it from here.

Driver core change:
"device-core: Ensure drvdata = NULL when no driver is bound"
(sha1: 0998d06)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Michal Simek authored and Russell King committed Dec 29, 2013
1 parent 90a8471 commit de77d1e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions arch/arm/kernel/etm.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ static int etb_probe(struct amba_device *dev, const struct amba_id *id)
return ret;

out_unmap:
amba_set_drvdata(dev, NULL);
iounmap(t->etb_regs);

out_release:
Expand All @@ -398,8 +397,6 @@ static int etb_remove(struct amba_device *dev)
{
struct tracectx *t = amba_get_drvdata(dev);

amba_set_drvdata(dev, NULL);

iounmap(t->etb_regs);
t->etb_regs = NULL;

Expand Down Expand Up @@ -588,7 +585,6 @@ static int etm_probe(struct amba_device *dev, const struct amba_id *id)
return ret;

out_unmap:
amba_set_drvdata(dev, NULL);
iounmap(t->etm_regs);

out_release:
Expand All @@ -601,8 +597,6 @@ static int etm_remove(struct amba_device *dev)
{
struct tracectx *t = amba_get_drvdata(dev);

amba_set_drvdata(dev, NULL);

iounmap(t->etm_regs);
t->etm_regs = NULL;

Expand Down

0 comments on commit de77d1e

Please sign in to comment.