Luiz Angelo Daros de Luca | bce254b | 2024-02-09 02:03:39 -0300 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | |
| 3 | #ifndef _REALTEK_SMI_H |
| 4 | #define _REALTEK_SMI_H |
| 5 | |
| 6 | #if IS_ENABLED(CONFIG_NET_DSA_REALTEK_SMI) |
| 7 | |
| 8 | static inline int realtek_smi_driver_register(struct platform_driver *drv) |
| 9 | { |
| 10 | return platform_driver_register(drv); |
| 11 | } |
| 12 | |
| 13 | static inline void realtek_smi_driver_unregister(struct platform_driver *drv) |
| 14 | { |
| 15 | platform_driver_unregister(drv); |
| 16 | } |
| 17 | |
| 18 | int realtek_smi_probe(struct platform_device *pdev); |
| 19 | void realtek_smi_remove(struct platform_device *pdev); |
| 20 | void realtek_smi_shutdown(struct platform_device *pdev); |
| 21 | |
| 22 | #else /* IS_ENABLED(CONFIG_NET_DSA_REALTEK_SMI) */ |
| 23 | |
| 24 | static inline int realtek_smi_driver_register(struct platform_driver *drv) |
| 25 | { |
| 26 | return 0; |
| 27 | } |
| 28 | |
| 29 | static inline void realtek_smi_driver_unregister(struct platform_driver *drv) |
| 30 | { |
| 31 | } |
| 32 | |
| 33 | static inline int realtek_smi_probe(struct platform_device *pdev) |
| 34 | { |
| 35 | return -ENOENT; |
| 36 | } |
| 37 | |
| 38 | static inline void realtek_smi_remove(struct platform_device *pdev) |
| 39 | { |
| 40 | } |
| 41 | |
| 42 | static inline void realtek_smi_shutdown(struct platform_device *pdev) |
| 43 | { |
| 44 | } |
| 45 | |
| 46 | #endif /* IS_ENABLED(CONFIG_NET_DSA_REALTEK_SMI) */ |
| 47 | |
| 48 | #endif /* _REALTEK_SMI_H */ |