[PATCH v1 1/1] coresight: cti: Replace inclusion by struct fwnode_handle forward declaration

James Clark james.clark at linaro.org
Mon Mar 31 06:40:51 PDT 2025



On 31/03/2025 8:14 am, Andy Shevchenko wrote:
> The fwnode.h is not supposed to be used by the drivers as it
> has the definitions for the core parts for different device
> property provider implementations. Drop it.
> 
> Since the code wants to use the pointer to the struct fwnode_handle
> the forward declaration is provided.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
> ---
>   drivers/hwtracing/coresight/coresight-cti.h | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-cti.h b/drivers/hwtracing/coresight/coresight-cti.h
> index 16e310e7e9d4..8362a47c939c 100644
> --- a/drivers/hwtracing/coresight/coresight-cti.h
> +++ b/drivers/hwtracing/coresight/coresight-cti.h
> @@ -9,7 +9,6 @@
>   
>   #include <linux/coresight.h>
>   #include <linux/device.h>
> -#include <linux/fwnode.h>
>   #include <linux/list.h>
>   #include <linux/spinlock.h>
>   #include <linux/sysfs.h>
> @@ -17,6 +16,8 @@
>   
>   #include "coresight-priv.h"
>   
> +struct fwnode_handle;
> +
>   /*
>    * Device registers
>    * 0x000 - 0x144: CTI programming and status

Reviewed-by: James Clark <james.clark at linaro.org>




More information about the linux-arm-kernel mailing list