From 6d49ed87cdf17d6e129e8667fc42e8fc98c4c2d2 Mon Sep 17 00:00:00 2001
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
Date: Mon, 3 Jun 2024 17:01:50 +0100
Subject: [PATCH] staging: vc04_services: vc-sm-cma: Drop include Makefile
 directive

Drop the include directive. They can break the build, when one only
wants to build a subdirectory. Replace with "../" for the includes in
the vc_sm files instead.

The fix is equivalent to the four patches between 29d49a76c5b2
("staging: vc04_services: bcm2835-audio: Drop include Makefile
directive")...2529ca211402 ("staging: vc04_services: interface: Drop
include Makefile directive")

Fixes: b1ab7a05eb6c ("staging: vc04_services: Add new vc-sm-cma driver")
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 drivers/staging/vc04_services/vc-sm-cma/Makefile         | 5 -----
 drivers/staging/vc04_services/vc-sm-cma/vc_sm.c          | 2 +-
 drivers/staging/vc04_services/vc-sm-cma/vc_sm_cma_vchi.h | 2 +-
 3 files changed, 2 insertions(+), 7 deletions(-)

--- a/drivers/staging/vc04_services/vc-sm-cma/Makefile
+++ b/drivers/staging/vc04_services/vc-sm-cma/Makefile
@@ -1,9 +1,4 @@
 ccflags-y += \
-	-I$(srctree)/$(src)/../ \
-	-I$(srctree)/$(src)/../interface/vchiq_arm\
-	-I$(srctree)/$(src)/../include
-
-ccflags-y += \
 	-D__VCCOREVER__=0
 
 vc-sm-cma-$(CONFIG_BCM_VC_SM_CMA) := \
--- a/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
+++ b/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
@@ -53,7 +53,7 @@
 
 #include "vc_sm.h"
 #include "vc_sm_knl.h"
-#include <linux/broadcom/vc_sm_cma_ioctl.h>
+#include "../include/linux/broadcom/vc_sm_cma_ioctl.h"
 
 MODULE_IMPORT_NS(DMA_BUF);
 
--- a/drivers/staging/vc04_services/vc-sm-cma/vc_sm_cma_vchi.h
+++ b/drivers/staging/vc04_services/vc-sm-cma/vc_sm_cma_vchi.h
@@ -13,7 +13,7 @@
 #ifndef __VC_SM_CMA_VCHI_H__INCLUDED__
 #define __VC_SM_CMA_VCHI_H__INCLUDED__
 
-#include <linux/raspberrypi/vchiq.h>
+#include "../include/linux/raspberrypi/vchiq.h"
 
 #include "vc_sm_defs.h"
 
