--- /dev/null
+From 3420f65cbbd0555049bd02394bed33a0ef74d860 Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Date: Fri, 23 Nov 2018 12:10:57 -0500
+Subject: media: dvb-pll: don't re-validate tuner frequencies
+
+From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+
+commit 3420f65cbbd0555049bd02394bed33a0ef74d860 upstream.
+
+The dvb_frontend core already checks for the frequencies. No
+need for any additional check inside the driver.
+
+It is part of the fixes for the following bug:
+ https://bugzilla.opensuse.org/show_bug.cgi?id=1116374
+
+Fixes: a3f90c75b833 ("media: dvb: convert tuner_info frequencies to Hz")
+Reported-by: Stakanov Schufter <stakanov@eclipso.eu>
+Reported-by: Takashi Iwai <tiwai@suse.de>
+Cc: stable@vger.kernel.org # For 4.19
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/dvb-frontends/dvb-pll.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/drivers/media/dvb-frontends/dvb-pll.c
++++ b/drivers/media/dvb-frontends/dvb-pll.c
+@@ -610,9 +610,6 @@ static int dvb_pll_configure(struct dvb_
+ u32 div;
+ int i;
+
+- if (frequency && (frequency < desc->min || frequency > desc->max))
+- return -EINVAL;
+-
+ for (i = 0; i < desc->count; i++) {
+ if (frequency > desc->entries[i].limit)
+ continue;
--- /dev/null
+From 3d8e450f517cdb33da77827ec75929354753e9c0 Mon Sep 17 00:00:00 2001
+From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Date: Tue, 20 Nov 2018 05:19:36 -0500
+Subject: media: dvb-pll: fix tuner frequency ranges
+
+From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+
+commit 3d8e450f517cdb33da77827ec75929354753e9c0 upstream.
+
+Tuners should report frequencies in Hz. That works fine on most
+drivers, but, in the case of dvb-pll, some settings are for
+satellite tuners, while others are for terrestrial/cable ones.
+
+The code was trying to solve it at probing time, but that doesn't
+work, as, when _attach is called, the delivery system may be wrong.
+
+Fix it by ensuring that all frequencies are in Hz at the per-tuner
+max/min values.
+
+While here, add a debug message, as this would help to debug any
+issues there.
+
+It partially fixes the following bug:
+ https://bugzilla.opensuse.org/show_bug.cgi?id=1116374
+
+Fixes: a3f90c75b833 ("media: dvb: convert tuner_info frequencies to Hz")
+Reported-by: Stakanov Schufter <stakanov@eclipso.eu>
+Reported-by: Takashi Iwai <tiwai@suse.de>
+Cc: stable@vger.kernel.org # For 4.19
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/dvb-frontends/dvb-pll.c | 103 +++++++++++++++-------------------
+ 1 file changed, 48 insertions(+), 55 deletions(-)
+
+--- a/drivers/media/dvb-frontends/dvb-pll.c
++++ b/drivers/media/dvb-frontends/dvb-pll.c
+@@ -80,8 +80,8 @@ struct dvb_pll_desc {
+
+ static const struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
+ .name = "Thomson dtt7579",
+- .min = 177000000,
+- .max = 858000000,
++ .min = 177 * MHz,
++ .max = 858 * MHz,
+ .iffreq= 36166667,
+ .sleepdata = (u8[]){ 2, 0xb4, 0x03 },
+ .count = 4,
+@@ -102,8 +102,8 @@ static void thomson_dtt759x_bw(struct dv
+
+ static const struct dvb_pll_desc dvb_pll_thomson_dtt759x = {
+ .name = "Thomson dtt759x",
+- .min = 177000000,
+- .max = 896000000,
++ .min = 177 * MHz,
++ .max = 896 * MHz,
+ .set = thomson_dtt759x_bw,
+ .iffreq= 36166667,
+ .sleepdata = (u8[]){ 2, 0x84, 0x03 },
+@@ -126,8 +126,8 @@ static void thomson_dtt7520x_bw(struct d
+
+ static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x = {
+ .name = "Thomson dtt7520x",
+- .min = 185000000,
+- .max = 900000000,
++ .min = 185 * MHz,
++ .max = 900 * MHz,
+ .set = thomson_dtt7520x_bw,
+ .iffreq = 36166667,
+ .count = 7,
+@@ -144,8 +144,8 @@ static const struct dvb_pll_desc dvb_pll
+
+ static const struct dvb_pll_desc dvb_pll_lg_z201 = {
+ .name = "LG z201",
+- .min = 174000000,
+- .max = 862000000,
++ .min = 174 * MHz,
++ .max = 862 * MHz,
+ .iffreq= 36166667,
+ .sleepdata = (u8[]){ 2, 0xbc, 0x03 },
+ .count = 5,
+@@ -160,8 +160,8 @@ static const struct dvb_pll_desc dvb_pll
+
+ static const struct dvb_pll_desc dvb_pll_unknown_1 = {
+ .name = "unknown 1", /* used by dntv live dvb-t */
+- .min = 174000000,
+- .max = 862000000,
++ .min = 174 * MHz,
++ .max = 862 * MHz,
+ .iffreq= 36166667,
+ .count = 9,
+ .entries = {
+@@ -182,8 +182,8 @@ static const struct dvb_pll_desc dvb_pll
+ */
+ static const struct dvb_pll_desc dvb_pll_tua6010xs = {
+ .name = "Infineon TUA6010XS",
+- .min = 44250000,
+- .max = 858000000,
++ .min = 44250 * kHz,
++ .max = 858 * MHz,
+ .iffreq= 36125000,
+ .count = 3,
+ .entries = {
+@@ -196,8 +196,8 @@ static const struct dvb_pll_desc dvb_pll
+ /* Panasonic env57h1xd5 (some Philips PLL ?) */
+ static const struct dvb_pll_desc dvb_pll_env57h1xd5 = {
+ .name = "Panasonic ENV57H1XD5",
+- .min = 44250000,
+- .max = 858000000,
++ .min = 44250 * kHz,
++ .max = 858 * MHz,
+ .iffreq= 36125000,
+ .count = 4,
+ .entries = {
+@@ -220,8 +220,8 @@ static void tda665x_bw(struct dvb_fronte
+
+ static const struct dvb_pll_desc dvb_pll_tda665x = {
+ .name = "Philips TDA6650/TDA6651",
+- .min = 44250000,
+- .max = 858000000,
++ .min = 44250 * kHz,
++ .max = 858 * MHz,
+ .set = tda665x_bw,
+ .iffreq= 36166667,
+ .initdata = (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab },
+@@ -254,8 +254,8 @@ static void tua6034_bw(struct dvb_fronte
+
+ static const struct dvb_pll_desc dvb_pll_tua6034 = {
+ .name = "Infineon TUA6034",
+- .min = 44250000,
+- .max = 858000000,
++ .min = 44250 * kHz,
++ .max = 858 * MHz,
+ .iffreq= 36166667,
+ .count = 3,
+ .set = tua6034_bw,
+@@ -278,8 +278,8 @@ static void tded4_bw(struct dvb_frontend
+
+ static const struct dvb_pll_desc dvb_pll_tded4 = {
+ .name = "ALPS TDED4",
+- .min = 47000000,
+- .max = 863000000,
++ .min = 47 * MHz,
++ .max = 863 * MHz,
+ .iffreq= 36166667,
+ .set = tded4_bw,
+ .count = 4,
+@@ -296,8 +296,8 @@ static const struct dvb_pll_desc dvb_pll
+ */
+ static const struct dvb_pll_desc dvb_pll_tdhu2 = {
+ .name = "ALPS TDHU2",
+- .min = 54000000,
+- .max = 864000000,
++ .min = 54 * MHz,
++ .max = 864 * MHz,
+ .iffreq= 44000000,
+ .count = 4,
+ .entries = {
+@@ -313,8 +313,8 @@ static const struct dvb_pll_desc dvb_pll
+ */
+ static const struct dvb_pll_desc dvb_pll_samsung_tbmv = {
+ .name = "Samsung TBMV30111IN / TBMV30712IN1",
+- .min = 54000000,
+- .max = 860000000,
++ .min = 54 * MHz,
++ .max = 860 * MHz,
+ .iffreq= 44000000,
+ .count = 6,
+ .entries = {
+@@ -332,8 +332,8 @@ static const struct dvb_pll_desc dvb_pll
+ */
+ static const struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {
+ .name = "Philips SD1878",
+- .min = 950000,
+- .max = 2150000,
++ .min = 950 * MHz,
++ .max = 2150 * MHz,
+ .iffreq= 249, /* zero-IF, offset 249 is to round up */
+ .count = 4,
+ .entries = {
+@@ -398,8 +398,8 @@ static void opera1_bw(struct dvb_fronten
+
+ static const struct dvb_pll_desc dvb_pll_opera1 = {
+ .name = "Opera Tuner",
+- .min = 900000,
+- .max = 2250000,
++ .min = 900 * MHz,
++ .max = 2250 * MHz,
+ .initdata = (u8[]){ 4, 0x08, 0xe5, 0xe1, 0x00 },
+ .initdata2 = (u8[]){ 4, 0x08, 0xe5, 0xe5, 0x00 },
+ .iffreq= 0,
+@@ -445,8 +445,8 @@ static void samsung_dtos403ih102a_set(st
+ /* unknown pll used in Samsung DTOS403IH102A DVB-C tuner */
+ static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = {
+ .name = "Samsung DTOS403IH102A",
+- .min = 44250000,
+- .max = 858000000,
++ .min = 44250 * kHz,
++ .max = 858 * MHz,
+ .iffreq = 36125000,
+ .count = 8,
+ .set = samsung_dtos403ih102a_set,
+@@ -465,8 +465,8 @@ static const struct dvb_pll_desc dvb_pll
+ /* Samsung TDTC9251DH0 DVB-T NIM, as used on AirStar 2 */
+ static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 = {
+ .name = "Samsung TDTC9251DH0",
+- .min = 48000000,
+- .max = 863000000,
++ .min = 48 * MHz,
++ .max = 863 * MHz,
+ .iffreq = 36166667,
+ .count = 3,
+ .entries = {
+@@ -479,8 +479,8 @@ static const struct dvb_pll_desc dvb_pll
+ /* Samsung TBDU18132 DVB-S NIM with TSA5059 PLL, used in SkyStar2 DVB-S 2.3 */
+ static const struct dvb_pll_desc dvb_pll_samsung_tbdu18132 = {
+ .name = "Samsung TBDU18132",
+- .min = 950000,
+- .max = 2150000, /* guesses */
++ .min = 950 * MHz,
++ .max = 2150 * MHz, /* guesses */
+ .iffreq = 0,
+ .count = 2,
+ .entries = {
+@@ -500,8 +500,8 @@ static const struct dvb_pll_desc dvb_pll
+ /* Samsung TBMU24112 DVB-S NIM with SL1935 zero-IF tuner */
+ static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = {
+ .name = "Samsung TBMU24112",
+- .min = 950000,
+- .max = 2150000, /* guesses */
++ .min = 950 * MHz,
++ .max = 2150 * MHz, /* guesses */
+ .iffreq = 0,
+ .count = 2,
+ .entries = {
+@@ -521,8 +521,8 @@ static const struct dvb_pll_desc dvb_pll
+ * 822 - 862 1 * 0 0 1 0 0 0 0x88 */
+ static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {
+ .name = "ALPS TDEE4",
+- .min = 47000000,
+- .max = 862000000,
++ .min = 47 * MHz,
++ .max = 862 * MHz,
+ .iffreq = 36125000,
+ .count = 4,
+ .entries = {
+@@ -537,8 +537,8 @@ static const struct dvb_pll_desc dvb_pll
+ /* CP cur. 50uA, AGC takeover: 103dBuV, PORT3 on */
+ static const struct dvb_pll_desc dvb_pll_tua6034_friio = {
+ .name = "Infineon TUA6034 ISDB-T (Friio)",
+- .min = 90000000,
+- .max = 770000000,
++ .min = 90 * MHz,
++ .max = 770 * MHz,
+ .iffreq = 57000000,
+ .initdata = (u8[]){ 4, 0x9a, 0x50, 0xb2, 0x08 },
+ .sleepdata = (u8[]){ 4, 0x9a, 0x70, 0xb3, 0x0b },
+@@ -553,8 +553,8 @@ static const struct dvb_pll_desc dvb_pll
+ /* Philips TDA6651 ISDB-T, used in Earthsoft PT1 */
+ static const struct dvb_pll_desc dvb_pll_tda665x_earth_pt1 = {
+ .name = "Philips TDA6651 ISDB-T (EarthSoft PT1)",
+- .min = 90000000,
+- .max = 770000000,
++ .min = 90 * MHz,
++ .max = 770 * MHz,
+ .iffreq = 57000000,
+ .initdata = (u8[]){ 5, 0x0e, 0x7f, 0xc1, 0x80, 0x80 },
+ .count = 10,
+@@ -799,7 +799,6 @@ struct dvb_frontend *dvb_pll_attach(stru
+ struct dvb_pll_priv *priv = NULL;
+ int ret;
+ const struct dvb_pll_desc *desc;
+- struct dtv_frontend_properties *c = &fe->dtv_property_cache;
+
+ b1 = kmalloc(1, GFP_KERNEL);
+ if (!b1)
+@@ -845,18 +844,12 @@ struct dvb_frontend *dvb_pll_attach(stru
+
+ strncpy(fe->ops.tuner_ops.info.name, desc->name,
+ sizeof(fe->ops.tuner_ops.info.name));
+- switch (c->delivery_system) {
+- case SYS_DVBS:
+- case SYS_DVBS2:
+- case SYS_TURBO:
+- case SYS_ISDBS:
+- fe->ops.tuner_ops.info.frequency_min_hz = desc->min * kHz;
+- fe->ops.tuner_ops.info.frequency_max_hz = desc->max * kHz;
+- break;
+- default:
+- fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
+- fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
+- }
++
++ fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
++ fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
++
++ dprintk("%s tuner, frequency range: %u...%u\n",
++ desc->name, desc->min, desc->max);
+
+ if (!desc->initdata)
+ fe->ops.tuner_ops.init = NULL;
--- /dev/null
+From f96d84488f7d5f9123428c700cea82a292bca53e Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <hverkuil@xs4all.nl>
+Date: Tue, 20 Nov 2018 05:13:04 -0500
+Subject: media: gspca: fix frame overflow error
+
+From: Hans Verkuil <hverkuil@xs4all.nl>
+
+commit f96d84488f7d5f9123428c700cea82a292bca53e upstream.
+
+When converting gspca to vb2 I missed that fact that the buffer sizes
+were rounded up to the next page size. As a result some gspca drivers
+(spca561 being one of them) reported frame overflows.
+
+Modify the code to align the buffer sizes to the next page size, just
+as the original code did.
+
+Fixes: 1f5965c4dfd7 ("media: gspca: convert to vb2")
+Tested-off-by: Hans Verkuil <hans.verkuil@cisco.com>
+Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
+Reported-by: softwarebugs <softwarebugs@protonmail.com>
+Cc: <stable@vger.kernel.org> # for v4.18 and up
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/usb/gspca/gspca.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+--- a/drivers/media/usb/gspca/gspca.c
++++ b/drivers/media/usb/gspca/gspca.c
+@@ -426,10 +426,10 @@ void gspca_frame_add(struct gspca_dev *g
+
+ /* append the packet to the frame buffer */
+ if (len > 0) {
+- if (gspca_dev->image_len + len > gspca_dev->pixfmt.sizeimage) {
++ if (gspca_dev->image_len + len > PAGE_ALIGN(gspca_dev->pixfmt.sizeimage)) {
+ gspca_err(gspca_dev, "frame overflow %d > %d\n",
+ gspca_dev->image_len + len,
+- gspca_dev->pixfmt.sizeimage);
++ PAGE_ALIGN(gspca_dev->pixfmt.sizeimage));
+ packet_type = DISCARD_PACKET;
+ } else {
+ /* !! image is NULL only when last pkt is LAST or DISCARD
+@@ -1297,18 +1297,19 @@ static int gspca_queue_setup(struct vb2_
+ unsigned int sizes[], struct device *alloc_devs[])
+ {
+ struct gspca_dev *gspca_dev = vb2_get_drv_priv(vq);
++ unsigned int size = PAGE_ALIGN(gspca_dev->pixfmt.sizeimage);
+
+ if (*nplanes)
+- return sizes[0] < gspca_dev->pixfmt.sizeimage ? -EINVAL : 0;
++ return sizes[0] < size ? -EINVAL : 0;
+ *nplanes = 1;
+- sizes[0] = gspca_dev->pixfmt.sizeimage;
++ sizes[0] = size;
+ return 0;
+ }
+
+ static int gspca_buffer_prepare(struct vb2_buffer *vb)
+ {
+ struct gspca_dev *gspca_dev = vb2_get_drv_priv(vb->vb2_queue);
+- unsigned long size = gspca_dev->pixfmt.sizeimage;
++ unsigned long size = PAGE_ALIGN(gspca_dev->pixfmt.sizeimage);
+
+ if (vb2_plane_size(vb, 0) < size) {
+ gspca_err(gspca_dev, "buffer too small (%lu < %lu)\n",
--- /dev/null
+From cb3b2ffb757e75fef40fb94bc093cbbf49a6bf6e Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <hverkuil@xs4all.nl>
+Date: Sat, 17 Nov 2018 06:25:08 -0500
+Subject: media: vicodec: fix memchr() kernel oops
+
+From: Hans Verkuil <hverkuil@xs4all.nl>
+
+commit cb3b2ffb757e75fef40fb94bc093cbbf49a6bf6e upstream.
+
+The size passed to memchr is too large as it assumes the search
+starts at the start of the buffer, but it can start at an offset.
+
+Cc: <stable@vger.kernel.org> # for v4.19 and up
+Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/platform/vicodec/vicodec-core.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/media/platform/vicodec/vicodec-core.c
++++ b/drivers/media/platform/vicodec/vicodec-core.c
+@@ -438,7 +438,8 @@ restart:
+ for (; p < p_out + sz; p++) {
+ u32 copy;
+
+- p = memchr(p, magic[ctx->comp_magic_cnt], sz);
++ p = memchr(p, magic[ctx->comp_magic_cnt],
++ p_out + sz - p);
+ if (!p) {
+ ctx->comp_magic_cnt = 0;
+ break;
--- /dev/null
+From 1e8249b8a4e960018e4baca6b523b8a4500af600 Mon Sep 17 00:00:00 2001
+From: Helge Deller <deller@gmx.de>
+Date: Thu, 29 Nov 2018 17:05:47 +0100
+Subject: parisc: Enable -ffunction-sections for modules on 32-bit kernel
+
+From: Helge Deller <deller@gmx.de>
+
+commit 1e8249b8a4e960018e4baca6b523b8a4500af600 upstream.
+
+Frank Schreiner reported, that since kernel 4.18 he faces sysfs-warnings
+when loading modules on a 32-bit kernel. Here is one such example:
+
+ sysfs: cannot create duplicate filename '/module/nfs/sections/.text'
+ CPU: 0 PID: 98 Comm: modprobe Not tainted 4.18.0-2-parisc #1 Debian 4.18.10-2
+ Backtrace:
+ [<1017ce2c>] show_stack+0x3c/0x50
+ [<107a7210>] dump_stack+0x28/0x38
+ [<103f900c>] sysfs_warn_dup+0x88/0xac
+ [<103f8b1c>] sysfs_add_file_mode_ns+0x164/0x1d0
+ [<103f9e70>] internal_create_group+0x11c/0x304
+ [<103fa0a0>] sysfs_create_group+0x48/0x60
+ [<1022abe8>] load_module.constprop.35+0x1f9c/0x23b8
+ [<1022b278>] sys_finit_module+0xd0/0x11c
+ [<101831dc>] syscall_exit+0x0/0x14
+
+This warning gets triggered by the fact, that due to commit 24b6c22504a2
+("parisc: Build kernel without -ffunction-sections") we now get multiple .text
+sections in the kernel modules for which sysfs_create_group() can't create
+multiple virtual files.
+
+This patch works around the problem by re-enabling the -ffunction-sections
+compiler option for modules, while keeping it disabled for the non-module
+kernel code.
+
+Reported-by: Frank Scheiner <frank.scheiner@web.de>
+Fixes: 24b6c22504a2 ("parisc: Build kernel without -ffunction-sections")
+Cc: <stable@vger.kernel.org> # v4.18+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/parisc/Makefile | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/arch/parisc/Makefile
++++ b/arch/parisc/Makefile
+@@ -71,6 +71,13 @@ ifdef CONFIG_MLONGCALLS
+ KBUILD_CFLAGS_KERNEL += -mlong-calls
+ endif
+
++# Without this, "ld -r" results in .text sections that are too big (> 0x40000)
++# for branches to reach stubs. And multiple .text sections trigger a warning
++# when creating the sysfs module information section.
++ifndef CONFIG_64BIT
++KBUILD_CFLAGS_MODULE += -ffunction-sections
++endif
++
+ # select which processor to optimise for
+ cflags-$(CONFIG_PA7000) += -march=1.1 -mschedule=7100
+ cflags-$(CONFIG_PA7200) += -march=1.1 -mschedule=7200
--- /dev/null
+From 48a2ca0ee3994df53da230c7079a18a70ec914f9 Mon Sep 17 00:00:00 2001
+From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
+Date: Tue, 4 Dec 2018 16:58:43 +0100
+Subject: Revert "mfd: cros_ec: Use devm_kzalloc for private data"
+
+From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
+
+commit 48a2ca0ee3994df53da230c7079a18a70ec914f9 upstream.
+
+This reverts commit 3aa2177e47878f7e7616da8a2050c44f22301b6e.
+
+That commit triggered a new WARN when unloading the module (see at the
+end of the commit message). When a class_dev is embedded in a structure
+then that class_dev is the thing that controls the lifetime of that
+structure, for that reason device managed allocations can't be used here.
+See Documentation/kobject.txt.
+
+Revert the above patch, so the struct is allocated using kzalloc and we
+have a release function for it that frees the allocated memory, otherwise
+it is broken.
+
+ ------------[ cut here ]------------
+ Device 'cros_ec' does not have a release() function, it is broken and must be fixed.
+ WARNING: CPU: 3 PID: 3675 at drivers/base/core.c:895 device_release+0x80/0x90
+ Modules linked in: btusb btrtl btintel btbcm bluetooth ...
+ CPU: 3 PID: 3675 Comm: rmmod Not tainted 4.20.0-rc4 #76
+ Hardware name: Google Kevin (DT)
+ pstate: 40000005 (nZcv daif -PAN -UAO)
+ pc : device_release+0x80/0x90
+ lr : device_release+0x80/0x90
+ sp : ffff00000c47bc70
+ x29: ffff00000c47bc70 x28: ffff8000e86b0d40
+ x27: 0000000000000000 x26: 0000000000000000
+ x25: 0000000056000000 x24: 0000000000000015
+ x23: ffff8000f0bbf860 x22: ffff000000d320a0
+ x21: ffff8000ee93e100 x20: ffff8000ed931428
+ x19: ffff8000ed931418 x18: 0000000000000020
+ x17: 0000000000000000 x16: 0000000000000000
+ x15: 0000000000000400 x14: 0000000000000143
+ x13: 0000000000000000 x12: 0000000000000400
+ x11: 0000000000000157 x10: 0000000000000960
+ x9 : ffff00000c47b9b0 x8 : ffff8000e86b1700
+ x7 : 0000000000000000 x6 : ffff8000f7d520b8
+ x5 : ffff8000f7d520b8 x4 : 0000000000000000
+ x3 : ffff8000f7d58e68 x2 : ffff8000e86b0d40
+ x1 : 37d859939c964800 x0 : 0000000000000000
+ Call trace:
+ device_release+0x80/0x90
+ kobject_put+0x74/0xe8
+ device_unregister+0x20/0x30
+ ec_device_remove+0x34/0x48 [cros_ec_dev]
+ platform_drv_remove+0x28/0x48
+ device_release_driver_internal+0x1a8/0x240
+ driver_detach+0x40/0x80
+ bus_remove_driver+0x54/0xa8
+ driver_unregister+0x2c/0x58
+ platform_driver_unregister+0x10/0x18
+ cros_ec_dev_exit+0x1c/0x2d8 [cros_ec_dev]
+ __arm64_sys_delete_module+0x16c/0x1f8
+ el0_svc_common+0x84/0xd8
+ el0_svc_handler+0x2c/0x80
+ el0_svc+0x8/0xc
+ ---[ end trace a57c4625f3c60ae8 ]---
+
+Cc: stable@vger.kernel.org
+Fixes: 3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")
+Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
+Reviewed-by: Guenter Roeck <groeck@chromium.org>
+Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mfd/cros_ec_dev.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/mfd/cros_ec_dev.c
++++ b/drivers/mfd/cros_ec_dev.c
+@@ -263,6 +263,11 @@ static const struct file_operations fops
+ #endif
+ };
+
++static void cros_ec_class_release(struct device *dev)
++{
++ kfree(to_cros_ec_dev(dev));
++}
++
+ static void cros_ec_sensors_register(struct cros_ec_dev *ec)
+ {
+ /*
+@@ -395,7 +400,7 @@ static int ec_device_probe(struct platfo
+ int retval = -ENOMEM;
+ struct device *dev = &pdev->dev;
+ struct cros_ec_platform *ec_platform = dev_get_platdata(dev);
+- struct cros_ec_dev *ec = devm_kzalloc(dev, sizeof(*ec), GFP_KERNEL);
++ struct cros_ec_dev *ec = kzalloc(sizeof(*ec), GFP_KERNEL);
+
+ if (!ec)
+ return retval;
+@@ -417,6 +422,7 @@ static int ec_device_probe(struct platfo
+ ec->class_dev.devt = MKDEV(ec_major, pdev->id);
+ ec->class_dev.class = &cros_class;
+ ec->class_dev.parent = dev;
++ ec->class_dev.release = cros_ec_class_release;
+
+ retval = dev_set_name(&ec->class_dev, "%s", ec_platform->ec_name);
+ if (retval) {
alsa-hda-realtek-add-support-for-acer-aspire-c24-860-headset-mic.patch
alsa-hda-realtek-fix-mic-issue-on-acer-aio-veriton-z4660g.patch
alsa-hda-realtek-fix-mic-issue-on-acer-aio-veriton-z4860g-z6860g.patch
+media-gspca-fix-frame-overflow-error.patch
+media-vicodec-fix-memchr-kernel-oops.patch
+media-dvb-pll-fix-tuner-frequency-ranges.patch
+media-dvb-pll-don-t-re-validate-tuner-frequencies.patch
+revert-mfd-cros_ec-use-devm_kzalloc-for-private-data.patch
+parisc-enable-ffunction-sections-for-modules-on-32-bit-kernel.patch