jz4740.c (734d1ece37fbf3d2ddfc71bc6c69e0fe35f02542) jz4740.c (b25b5aa06667b01fee8fe2648d4ea9db32c87d1a)
1/*
2 * Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * You should have received a copy of the GNU General Public License along

--- 347 unchanged lines hidden (view full) ---

356 void __iomem *base;
357
358 jz4740_codec = devm_kzalloc(&pdev->dev, sizeof(*jz4740_codec),
359 GFP_KERNEL);
360 if (!jz4740_codec)
361 return -ENOMEM;
362
363 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1/*
2 * Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * You should have received a copy of the GNU General Public License along

--- 347 unchanged lines hidden (view full) ---

356 void __iomem *base;
357
358 jz4740_codec = devm_kzalloc(&pdev->dev, sizeof(*jz4740_codec),
359 GFP_KERNEL);
360 if (!jz4740_codec)
361 return -ENOMEM;
362
363 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
364 base = devm_request_and_ioremap(&pdev->dev, mem);
365 if (!base)
366 return -EBUSY;
364 base = devm_ioremap_resource(&pdev->dev, mem);
365 if (IS_ERR(base))
366 return PTR_ERR(base);
367
368 jz4740_codec->regmap = devm_regmap_init_mmio(&pdev->dev, base,
369 &jz4740_codec_regmap_config);
370 if (IS_ERR(jz4740_codec->regmap))
371 return PTR_ERR(jz4740_codec->regmap);
372
373 platform_set_drvdata(pdev, jz4740_codec);
374

--- 32 unchanged lines hidden ---
367
368 jz4740_codec->regmap = devm_regmap_init_mmio(&pdev->dev, base,
369 &jz4740_codec_regmap_config);
370 if (IS_ERR(jz4740_codec->regmap))
371 return PTR_ERR(jz4740_codec->regmap);
372
373 platform_set_drvdata(pdev, jz4740_codec);
374

--- 32 unchanged lines hidden ---