X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=recipes-kernel%2Fsllin%2Fsllin%2F0002-5.4-less-than-110-fix.patch;fp=recipes-kernel%2Fsllin%2Fsllin%2F0002-5.4-less-than-110-fix.patch;h=8c13bfb5387b245b816d23f2826dfed4d557704b;hb=e5349e7b7beeed120e6cbfb1175bf823dd30b032;hp=0000000000000000000000000000000000000000;hpb=ca7d98904253c7404c3e6384ebb53d922a3c538a;p=AGL%2Fmeta-agl-demo.git diff --git a/recipes-kernel/sllin/sllin/0002-5.4-less-than-110-fix.patch b/recipes-kernel/sllin/sllin/0002-5.4-less-than-110-fix.patch new file mode 100644 index 000000000..8c13bfb53 --- /dev/null +++ b/recipes-kernel/sllin/sllin/0002-5.4-less-than-110-fix.patch @@ -0,0 +1,25 @@ +Fix compilation against kernels < 5.4.110 + +The fix to handle the backport of 4e096a18 to linux-5.4.y is a bit +too broad, as it breaks building against kernels older than 5.4.110, +add a version check to fix. + +Upstream-Status: pending +Signed-off-by: Scott Murray + +diff --git a/sllin/sllin.c b/sllin/sllin.c +index b3f2636..a6fb120 100644 +--- a/sllin/sllin.c ++++ b/sllin/sllin.c +@@ -1604,7 +1604,11 @@ static struct sllin *sll_alloc(dev_t line) + sl = netdev_priv(dev); + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) + can_ml = (void *)sl + ALIGN(sizeof(*sl), NETDEV_ALIGN); ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 110) + can_set_ml_priv(dev, can_ml); ++ #else ++ dev->ml_priv = can_ml; ++ #endif + #endif + /* Initialize channel control data */ + sl->magic = SLLIN_MAGIC;