kpss-xcc.c (3eb66e91a25497065c5322b1268cbc3953642227) | kpss-xcc.c (17c774ab41292148045fe297a3791a66bc4bb3ea) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2// Copyright (c) 2018, The Linux Foundation. All rights reserved. 3 4#include <linux/kernel.h> 5#include <linux/init.h> 6#include <linux/module.h> 7#include <linux/platform_device.h> 8#include <linux/err.h> --- 19 unchanged lines hidden (view full) --- 28 {} 29}; 30MODULE_DEVICE_TABLE(of, kpss_xcc_match_table); 31 32static int kpss_xcc_driver_probe(struct platform_device *pdev) 33{ 34 const struct of_device_id *id; 35 struct clk *clk; | 1// SPDX-License-Identifier: GPL-2.0 2// Copyright (c) 2018, The Linux Foundation. All rights reserved. 3 4#include <linux/kernel.h> 5#include <linux/init.h> 6#include <linux/module.h> 7#include <linux/platform_device.h> 8#include <linux/err.h> --- 19 unchanged lines hidden (view full) --- 28 {} 29}; 30MODULE_DEVICE_TABLE(of, kpss_xcc_match_table); 31 32static int kpss_xcc_driver_probe(struct platform_device *pdev) 33{ 34 const struct of_device_id *id; 35 struct clk *clk; |
36 struct resource *res; | |
37 void __iomem *base; 38 const char *name; 39 40 id = of_match_device(kpss_xcc_match_table, &pdev->dev); 41 if (!id) 42 return -ENODEV; 43 | 36 void __iomem *base; 37 const char *name; 38 39 id = of_match_device(kpss_xcc_match_table, &pdev->dev); 40 if (!id) 41 return -ENODEV; 42 |
44 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 45 base = devm_ioremap_resource(&pdev->dev, res); | 43 base = devm_platform_ioremap_resource(pdev, 0); |
46 if (IS_ERR(base)) 47 return PTR_ERR(base); 48 49 if (id->data) { 50 if (of_property_read_string_index(pdev->dev.of_node, 51 "clock-output-names", 52 0, &name)) 53 return -ENODEV; --- 34 unchanged lines hidden --- | 44 if (IS_ERR(base)) 45 return PTR_ERR(base); 46 47 if (id->data) { 48 if (of_property_read_string_index(pdev->dev.of_node, 49 "clock-output-names", 50 0, &name)) 51 return -ENODEV; --- 34 unchanged lines hidden --- |