diff options
Diffstat (limited to 'drivers/staging/most/dim2/dim2.c')
-rw-r--r-- | drivers/staging/most/dim2/dim2.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c index 7a5f80e637a0..44d3252d4612 100644 --- a/drivers/staging/most/dim2/dim2.c +++ b/drivers/staging/most/dim2/dim2.c @@ -108,7 +108,10 @@ struct dim2_platform_data { u8 fcnt; }; -#define iface_to_hdm(iface) container_of(iface, struct dim2_hdm, most_iface) +static inline struct dim2_hdm *iface_to_hdm(struct most_interface *iface) +{ + return container_of(iface, struct dim2_hdm, most_iface); +} /* Macro to identify a network status message */ #define PACKET_IS_NET_INFO(p) \ @@ -775,8 +778,7 @@ static int dim2_probe(struct platform_device *pdev) goto err_free_dev; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dev->io_base = devm_ioremap_resource(&pdev->dev, res); + dev->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(dev->io_base)) { ret = PTR_ERR(dev->io_base); goto err_free_dev; @@ -906,13 +908,11 @@ err_free_dev: * * Unregister the interface from mostcore */ -static int dim2_remove(struct platform_device *pdev) +static void dim2_remove(struct platform_device *pdev) { struct dim2_hdm *dev = platform_get_drvdata(pdev); most_deregister_interface(&dev->most_iface); - - return 0; } /* platform specific functions [[ */ @@ -987,7 +987,6 @@ static int rcar_gen2_enable(struct platform_device *pdev) writel(0x04, dev->io_base + 0x600); } - /* BBCR = 0b11 */ writel(0x03, dev->io_base + 0x500); writel(0x0002FF02, dev->io_base + 0x508); @@ -1091,7 +1090,7 @@ MODULE_DEVICE_TABLE(of, dim2_of_match); static struct platform_driver dim2_driver = { .probe = dim2_probe, - .remove = dim2_remove, + .remove_new = dim2_remove, .driver = { .name = "hdm_dim2", .of_match_table = dim2_of_match, |