aspeed-pwm-tacho.c (58e16d792a6a8c6b750f637a4649967fcac853dc) | aspeed-pwm-tacho.c (7b10e17067dc459642ecf88f7ecf552ceded121c) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (c) 2016 Google, Inc 4 */ 5 6#include <linux/clk.h> 7#include <linux/delay.h> 8#include <linux/errno.h> --- 877 unchanged lines hidden (view full) --- 886} 887 888static int aspeed_pwm_tacho_probe(struct platform_device *pdev) 889{ 890 struct device *dev = &pdev->dev; 891 struct device_node *np, *child; 892 struct aspeed_pwm_tacho_data *priv; 893 void __iomem *regs; | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (c) 2016 Google, Inc 4 */ 5 6#include <linux/clk.h> 7#include <linux/delay.h> 8#include <linux/errno.h> --- 877 unchanged lines hidden (view full) --- 886} 887 888static int aspeed_pwm_tacho_probe(struct platform_device *pdev) 889{ 890 struct device *dev = &pdev->dev; 891 struct device_node *np, *child; 892 struct aspeed_pwm_tacho_data *priv; 893 void __iomem *regs; |
894 struct resource *res; | |
895 struct device *hwmon; 896 struct clk *clk; 897 int ret; 898 899 np = dev->of_node; | 894 struct device *hwmon; 895 struct clk *clk; 896 int ret; 897 898 np = dev->of_node; |
900 901 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 902 if (!res) 903 return -ENOENT; 904 regs = devm_ioremap_resource(dev, res); | 899 regs = devm_platform_ioremap_resource(pdev, 0); |
905 if (IS_ERR(regs)) 906 return PTR_ERR(regs); 907 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 908 if (!priv) 909 return -ENOMEM; 910 priv->regmap = devm_regmap_init(dev, NULL, (__force void *)regs, 911 &aspeed_pwm_tacho_regmap_config); 912 if (IS_ERR(priv->regmap)) --- 63 unchanged lines hidden --- | 900 if (IS_ERR(regs)) 901 return PTR_ERR(regs); 902 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 903 if (!priv) 904 return -ENOMEM; 905 priv->regmap = devm_regmap_init(dev, NULL, (__force void *)regs, 906 &aspeed_pwm_tacho_regmap_config); 907 if (IS_ERR(priv->regmap)) --- 63 unchanged lines hidden --- |