kernel: Update to version 5.15.182

Manually adapted the following patches:
   generic/backport-5.15/828-v6.4-0002-of-Update-of_device_get_modalias.patch
   generic/backport-5.15/828-v6.4-0004-of-Move-of_modalias-to-module.c.patch

changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.182

Signed-off-by: Antony Kolitsos <zeusomighty@hotmail.com>
This commit is contained in:
Antony Kolitsos
2025-05-17 11:18:55 -07:00
committed by David Bauer
parent 417e79967c
commit 3b3d16ec49
7 changed files with 26 additions and 23 deletions

View File

@@ -31,7 +31,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/net/phy/microchip.c
+++ b/drivers/net/phy/microchip.c
@@ -233,6 +233,7 @@ static int lan88xx_probe(struct phy_devi
@@ -192,6 +192,7 @@ static int lan88xx_probe(struct phy_devi
struct device *dev = &phydev->mdio.dev;
struct lan88xx_priv *priv;
u32 led_modes[4];
@@ -39,7 +39,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
int len;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -262,6 +263,32 @@ static int lan88xx_probe(struct phy_devi
@@ -221,6 +222,32 @@ static int lan88xx_probe(struct phy_devi
return -EINVAL;
}

View File

@@ -26,7 +26,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
return -ENODEV;
/* Name & Type */
@@ -372,7 +372,7 @@ int of_device_uevent_modalias(struct dev
@@ -373,7 +373,7 @@ int of_device_uevent_modalias(struct dev
{
int sl;

View File

@@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -381,6 +381,8 @@ int of_device_uevent_modalias(struct dev
@@ -382,6 +382,8 @@ int of_device_uevent_modalias(struct dev
sl = of_device_get_modalias(dev, &env->buf[env->buflen-1],
sizeof(env->buf) - env->buflen);

View File

@@ -32,7 +32,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
{
const char *compat;
char *c;
@@ -249,19 +249,16 @@ static ssize_t of_device_get_modalias(st
@@ -249,20 +249,17 @@ static ssize_t of_device_get_modalias(st
ssize_t csize;
ssize_t tsize;
@@ -46,16 +46,17 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+ csize = snprintf(str, len, "of:N%pOFn%c%s", np, 'T',
+ of_node_get_device_type(np));
tsize = csize;
if (csize >= len)
csize = len > 0 ? len - 1 : 0;
len -= csize;
if (str)
str += csize;
str += csize;
- of_property_for_each_string(dev->of_node, "compatible", p, compat) {
+ of_property_for_each_string(np, "compatible", p, compat) {
csize = strlen(compat) + 1;
tsize += csize;
if (csize > len)
@@ -286,7 +283,10 @@ int of_device_request_module(struct devi
if (csize >= len)
@@ -287,7 +284,10 @@ int of_device_request_module(struct devi
ssize_t size;
int ret;
@@ -67,7 +68,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (size < 0)
return size;
@@ -297,7 +297,7 @@ int of_device_request_module(struct devi
@@ -298,7 +298,7 @@ int of_device_request_module(struct devi
if (!str)
return -ENOMEM;
@@ -76,7 +77,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
str[size - 1] = '\0';
ret = request_module(str);
kfree(str);
@@ -314,7 +314,12 @@ EXPORT_SYMBOL_GPL(of_device_request_modu
@@ -315,7 +315,12 @@ EXPORT_SYMBOL_GPL(of_device_request_modu
*/
ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len)
{
@@ -90,7 +91,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (sl < 0)
return sl;
if (sl > len - 2)
@@ -379,8 +384,8 @@ int of_device_uevent_modalias(struct dev
@@ -380,8 +385,8 @@ int of_device_uevent_modalias(struct dev
if (add_uevent_var(env, "MODALIAS="))
return -ENOMEM;

View File

@@ -43,7 +43,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/of_device.h>
@@ -241,42 +240,6 @@ const void *of_device_get_match_data(con
@@ -241,43 +240,6 @@ const void *of_device_get_match_data(con
}
EXPORT_SYMBOL(of_device_get_match_data);
@@ -60,14 +60,15 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- csize = snprintf(str, len, "of:N%pOFn%c%s", np, 'T',
- of_node_get_device_type(np));
- tsize = csize;
- if (csize >= len)
- csize = len > 0 ? len - 1 : 0;
- len -= csize;
- if (str)
- str += csize;
- str += csize;
-
- of_property_for_each_string(np, "compatible", p, compat) {
- csize = strlen(compat) + 1;
- tsize += csize;
- if (csize > len)
- if (csize >= len)
- continue;
-
- csize = snprintf(str, len, "C%s", compat);
@@ -88,7 +89,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
char *str;
--- /dev/null
+++ b/drivers/of/module.c
@@ -0,0 +1,44 @@
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Linux kernel module helpers.
@@ -111,14 +112,15 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+ csize = snprintf(str, len, "of:N%pOFn%c%s", np, 'T',
+ of_node_get_device_type(np));
+ tsize = csize;
+ if (csize >= len)
+ csize = len > 0 ? len - 1 : 0;
+ len -= csize;
+ if (str)
+ str += csize;
+ str += csize;
+
+ of_property_for_each_string(np, "compatible", p, compat) {
+ csize = strlen(compat) + 1;
+ tsize += csize;
+ if (csize > len)
+ if (csize >= len)
+ continue;
+
+ csize = snprintf(str, len, "C%s", compat);

View File

@@ -74,7 +74,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
#include <linux/slab.h>
#include <linux/string.h>
@@ -42,3 +43,32 @@ ssize_t of_modalias(const struct device_
@@ -43,3 +44,32 @@ ssize_t of_modalias(const struct device_
return tsize;
}