mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
pinctrl: tangier: Join tng_pinctrl_probe() into its wrapper
There is no clear sign why we have tng_pinctrl_probe() in the first place when it has already been using managed calls. Join the function into its devm_tng_pinctrl_probe() wrapper. Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
@@ -518,15 +518,19 @@ static const struct pinctrl_desc tng_pinctrl_desc = {
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
static int tng_pinctrl_probe(struct platform_device *pdev,
|
||||
const struct tng_pinctrl *data)
|
||||
int devm_tng_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
const struct tng_pinctrl *data;
|
||||
struct tng_family *families;
|
||||
struct tng_pinctrl *tp;
|
||||
void __iomem *regs;
|
||||
unsigned int i;
|
||||
|
||||
data = device_get_match_data(dev);
|
||||
if (!data)
|
||||
return -ENODATA;
|
||||
|
||||
tp = devm_kmemdup(dev, data, sizeof(*data), GFP_KERNEL);
|
||||
if (!tp)
|
||||
return -ENOMEM;
|
||||
@@ -566,17 +570,6 @@ static int tng_pinctrl_probe(struct platform_device *pdev,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int devm_tng_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct tng_pinctrl *data;
|
||||
|
||||
data = device_get_match_data(&pdev->dev);
|
||||
if (!data)
|
||||
return -ENODATA;
|
||||
|
||||
return tng_pinctrl_probe(pdev, data);
|
||||
}
|
||||
EXPORT_SYMBOL_NS_GPL(devm_tng_pinctrl_probe, "PINCTRL_TANGIER");
|
||||
|
||||
MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
|
||||
|
||||
Reference in New Issue
Block a user