mirror_ubuntu-kernels/include/drm/bridge/aux-bridge.h
Nathan Chancellor 812cc1da7f drm/bridge: Return NULL instead of plain 0 in drm_dp_hpd_bridge_register() stub
sparse complains:

  drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c: note: in included file:
  include/drm/bridge/aux-bridge.h:29:16: sparse: sparse: Using plain integer as NULL pointer

Return NULL to clear up the warning.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312060025.BdeqZrWx-lkp@intel.com/
Fixes: e560518a6c ("drm/bridge: implement generic DP HPD bridge")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231205-drm_aux_bridge-fixes-v1-3-d242a0ae9df4@kernel.org
2023-12-07 12:28:03 +02:00

38 lines
887 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2023 Linaro Ltd.
*
* Author: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
*/
#ifndef DRM_AUX_BRIDGE_H
#define DRM_AUX_BRIDGE_H
#include <drm/drm_connector.h>
#if IS_ENABLED(CONFIG_DRM_AUX_BRIDGE)
int drm_aux_bridge_register(struct device *parent);
#else
static inline int drm_aux_bridge_register(struct device *parent)
{
return 0;
}
#endif
#if IS_ENABLED(CONFIG_DRM_AUX_HPD_BRIDGE)
struct device *drm_dp_hpd_bridge_register(struct device *parent,
struct device_node *np);
void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status status);
#else
static inline struct device *drm_dp_hpd_bridge_register(struct device *parent,
struct device_node *np)
{
return NULL;
}
static inline void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status status)
{
}
#endif
#endif