openwrt/target/linux/bcm27xx/patches-6.6/950-1358-misc-rpi-pio-back-port-some.patch
John Audia f4c5d0e77e bcm27xx: patches: cherry-pick for RP1 kmods
Cherry-pick patches to support building RP1 modules.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17233
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 613dd79d5eabe53f07a7b74cc062d91cfc550403)
2024-12-28 14:11:52 +01:00

40 lines
1.4 KiB
Diff

From d1f0c94e974a5f26d210b1d13a6ef9543bee4984 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Thu, 21 Nov 2024 11:11:48 +0000
Subject: [PATCH] misc: rp1-pio: Back-port some 6.11 build fixes
Porting rp1-pio to rpi-6.11.y uncovered a few missing #includes and a
difference of const-ness. Although not needed here, back-porting the
resulting changes makes the driver more "correct" and may prevent a
future merge conflict.
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/misc/rp1-pio.c | 3 +++
include/linux/pio_rp1.h | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/misc/rp1-pio.c
+++ b/drivers/misc/rp1-pio.c
@@ -22,6 +22,9 @@
#include <linux/init.h>
#include <linux/ioctl.h>
#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/pio_rp1.h>
+#include <linux/platform_device.h>
#include <linux/rp1-firmware.h>
#include <linux/semaphore.h>
#include <linux/slab.h>
--- a/include/linux/pio_rp1.h
+++ b/include/linux/pio_rp1.h
@@ -176,7 +176,7 @@ typedef rp1_pio_sm_config pio_sm_config;
typedef struct rp1_pio_client *PIO;
void pio_set_error(struct rp1_pio_client *client, int err);
-int pio_get_error(struct rp1_pio_client *client);
+int pio_get_error(const struct rp1_pio_client *client);
void pio_clear_error(struct rp1_pio_client *client);
int rp1_pio_can_add_program(struct rp1_pio_client *client, void *param);