]> git.karo-electronics.de Git - linux-beck.git/commit
staging: most: hdm-dim2: Switch to devm_ioremap_resource()
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Thu, 18 Feb 2016 14:41:50 +0000 (20:11 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 23:02:06 +0000 (15:02 -0800)
commitbab469cdb6674cdf03b9243663cbbb8326510b41
tree985872f5d4a62928d2193f7110bafd9050dbeda7
parent8661fca6f679996133765fa905e9a480b8c96a74
staging: most: hdm-dim2: Switch to devm_ioremap_resource()

Devm_ functions allocate memory that is released when a driver
detaches. Replace request_mem_region and ioremap with
devm_ioremap_resource and remove corresponding freeing functions
release_mem_region and iounmap from probe and remove functions of a
platform device.

Also, an unnecessary platform_set_drvdata() has been removed since the
driver core clears the driver data to NULL after device release or on
probe failure. There is no need to manually clear the device driver
data to NULL.

Lastly, unnecessary labels have been removed.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/hdm-dim2/dim2_hdm.c