.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Rockchip eFuse Driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2015 Rockchip Electronics Co. Ltd. |
---|
5 | 6 | * Author: Caesar Wang <wxt@rock-chips.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or modify it |
---|
8 | | - * under the terms of version 2 of the GNU General Public License as |
---|
9 | | - * published by the Free Software Foundation. |
---|
10 | | - * |
---|
11 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
---|
12 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
13 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
14 | | - * more details. |
---|
15 | 7 | */ |
---|
16 | 8 | |
---|
17 | 9 | #include <linux/clk.h> |
---|
.. | .. |
---|
547 | 539 | }; |
---|
548 | 540 | MODULE_DEVICE_TABLE(of, rockchip_efuse_match); |
---|
549 | 541 | |
---|
550 | | -static int __init rockchip_efuse_probe(struct platform_device *pdev) |
---|
| 542 | +static int rockchip_efuse_probe(struct platform_device *pdev) |
---|
551 | 543 | { |
---|
552 | 544 | struct resource *res; |
---|
553 | 545 | struct nvmem_device *nvmem; |
---|
.. | .. |
---|
591 | 583 | } |
---|
592 | 584 | |
---|
593 | 585 | static struct platform_driver rockchip_efuse_driver = { |
---|
| 586 | + .probe = rockchip_efuse_probe, |
---|
594 | 587 | .driver = { |
---|
595 | 588 | .name = "rockchip-efuse", |
---|
596 | 589 | .of_match_table = rockchip_efuse_match, |
---|
597 | 590 | }, |
---|
598 | 591 | }; |
---|
599 | 592 | |
---|
600 | | -static int __init rockchip_efuse_module_init(void) |
---|
| 593 | +static int __init rockchip_efuse_init(void) |
---|
601 | 594 | { |
---|
602 | | - return platform_driver_probe(&rockchip_efuse_driver, |
---|
603 | | - rockchip_efuse_probe); |
---|
| 595 | + int ret; |
---|
| 596 | + |
---|
| 597 | + ret = platform_driver_register(&rockchip_efuse_driver); |
---|
| 598 | + if (ret) { |
---|
| 599 | + pr_err("failed to register efuse driver\n"); |
---|
| 600 | + return ret; |
---|
| 601 | + } |
---|
| 602 | + |
---|
| 603 | + return 0; |
---|
604 | 604 | } |
---|
605 | 605 | |
---|
606 | | -subsys_initcall(rockchip_efuse_module_init); |
---|
| 606 | +static void __exit rockchip_efuse_exit(void) |
---|
| 607 | +{ |
---|
| 608 | + return platform_driver_unregister(&rockchip_efuse_driver); |
---|
| 609 | +} |
---|
| 610 | + |
---|
| 611 | +subsys_initcall(rockchip_efuse_init); |
---|
| 612 | +module_exit(rockchip_efuse_exit); |
---|
607 | 613 | |
---|
608 | 614 | MODULE_DESCRIPTION("rockchip_efuse driver"); |
---|
609 | 615 | MODULE_LICENSE("GPL v2"); |
---|