From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB
---
kernel/drivers/sbus/char/flash.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/kernel/drivers/sbus/char/flash.c b/kernel/drivers/sbus/char/flash.c
index a610b8d..3adfef2 100644
--- a/kernel/drivers/sbus/char/flash.c
+++ b/kernel/drivers/sbus/char/flash.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/* flash.c: Allow mmap access to the OBP Flash, for OBP updates.
*
* Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
@@ -16,7 +17,6 @@
#include <linux/of_device.h>
#include <linux/uaccess.h>
-#include <asm/pgtable.h>
#include <asm/io.h>
#include <asm/upa.h>
@@ -29,8 +29,6 @@
unsigned long write_size; /* Size of write area */
unsigned long busy; /* In use? */
} flash;
-
-#define FLASH_MINOR 152
static int
flash_mmap(struct file *file, struct vm_area_struct *vma)
@@ -156,7 +154,7 @@
.release = flash_release,
};
-static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops };
+static struct miscdevice flash_dev = { SBUS_FLASH_MINOR, "flash", &flash_fops };
static int flash_probe(struct platform_device *op)
{
@@ -165,9 +163,9 @@
parent = dp->parent;
- if (strcmp(parent->name, "sbus") &&
- strcmp(parent->name, "sbi") &&
- strcmp(parent->name, "ebus"))
+ if (!of_node_name_eq(parent, "sbus") &&
+ !of_node_name_eq(parent, "sbi") &&
+ !of_node_name_eq(parent, "ebus"))
return -ENODEV;
flash.read_base = op->resource[0].start;
--
Gitblit v1.6.2