Add header file macro definition.
Signed-off-by: Li zeming <[email protected]>
---
drivers/acpi/sbshc.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/acpi/sbshc.h b/drivers/acpi/sbshc.h
index 695c390e2884..22b11a1655d2 100644
--- a/drivers/acpi/sbshc.h
+++ b/drivers/acpi/sbshc.h
@@ -1,4 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _SBSHC_H
+#define _SBSHC_H
+
struct acpi_smb_hc;
enum acpi_smb_protocol {
SMBUS_WRITE_QUICK = 2,
@@ -30,3 +33,4 @@ extern int acpi_smbus_write(struct acpi_smb_hc *hc, u8 protocol, u8 slave_addres
extern int acpi_smbus_register_callback(struct acpi_smb_hc *hc,
smbus_alarm_callback callback, void *context);
extern int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc);
+#endif
--
2.18.2
On Wed, Jul 6, 2022 at 3:34 AM Li zeming <[email protected]> wrote:
>
> Add header file macro definition.
Please explain why you want to make this change.
> Signed-off-by: Li zeming <[email protected]>
> ---
> drivers/acpi/sbshc.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/acpi/sbshc.h b/drivers/acpi/sbshc.h
> index 695c390e2884..22b11a1655d2 100644
> --- a/drivers/acpi/sbshc.h
> +++ b/drivers/acpi/sbshc.h
> @@ -1,4 +1,7 @@
> /* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _SBSHC_H
> +#define _SBSHC_H
> +
> struct acpi_smb_hc;
> enum acpi_smb_protocol {
> SMBUS_WRITE_QUICK = 2,
> @@ -30,3 +33,4 @@ extern int acpi_smbus_write(struct acpi_smb_hc *hc, u8 protocol, u8 slave_addres
> extern int acpi_smbus_register_callback(struct acpi_smb_hc *hc,
> smbus_alarm_callback callback, void *context);
> extern int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc);
> +#endif
> --
> 2.18.2
>
I think the header file could avoid redefinition errors.
at compile time by adding macro definitions.