pinctrl: merrifield: Use devm_platform_ioremap_resource()
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
Родитель
9d5b6a9520
Коммит
fa01aff976
|
@ -885,7 +885,6 @@ static int mrfld_pinctrl_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct mrfld_family *families;
|
struct mrfld_family *families;
|
||||||
struct mrfld_pinctrl *mp;
|
struct mrfld_pinctrl *mp;
|
||||||
struct resource *mem;
|
|
||||||
void __iomem *regs;
|
void __iomem *regs;
|
||||||
size_t nfamilies;
|
size_t nfamilies;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
@ -897,8 +896,7 @@ static int mrfld_pinctrl_probe(struct platform_device *pdev)
|
||||||
mp->dev = &pdev->dev;
|
mp->dev = &pdev->dev;
|
||||||
raw_spin_lock_init(&mp->lock);
|
raw_spin_lock_init(&mp->lock);
|
||||||
|
|
||||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
regs = devm_platform_ioremap_resource(pdev, 0);
|
||||||
regs = devm_ioremap_resource(&pdev->dev, mem);
|
|
||||||
if (IS_ERR(regs))
|
if (IS_ERR(regs))
|
||||||
return PTR_ERR(regs);
|
return PTR_ERR(regs);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче