From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: lee.jones@linaro.org
Cc: gwendal@chromium.org, drinkcat@chromium.org,
linux-kernel@vger.kernel.org, groeck@chromium.org,
kernel@collabora.com, bleung@chromium.org
Subject: [PATCH v2 8/8] mfd: cros_ec: add a dev_release empty method.
Date: Mon, 26 Nov 2018 18:51:58 +0100 [thread overview]
Message-ID: <20181126175158.5425-9-enric.balletbo@collabora.com> (raw)
In-Reply-To: <20181126175158.5425-1-enric.balletbo@collabora.com>
Devices are required to provide a release method. This patch fixes the
following WARN():
[ 47.218707] ------------[ cut here ]------------
[ 47.223901] Device 'cros_ec' does not have a release() function, it is broken and must be fixed.
[ 47.234430] WARNING: CPU: 0 PID: 3585 at drivers/base/core.c:895 device_release+0x80/0x90
[ 47.243560] Modules linked in: btusb btrtl btintel btbcm bluetooth ecdh_generic [...]
[ 47.323851] CPU: 0 PID: 3585 Comm: rmmod Not tainted 4.20.0-rc2+ #29
[ 47.330947] Hardware name: Google Kevin (DT)
[ 47.335714] pstate: 40000005 (nZcv daif -PAN -UAO)
[ 47.341063] pc : device_release+0x80/0x90
[ 47.345537] lr : device_release+0x80/0x90
[ 47.350001] sp : ffff00000b17bc70
[ 47.353698] x29: ffff00000b17bc70 x28: ffff8000e48e9a80
[ 47.359629] x27: 0000000000000000 x26: 0000000000000000
[ 47.365561] x25: 0000000056000000 x24: 0000000000000015
[ 47.371492] x23: ffff8000f0248060 x22: ffff000000b700a0
[ 47.377414] x21: ffff8000edf56100 x20: ffff8000edd13028
[ 47.383346] x19: ffff8000edd13018 x18: 0000000000000095
[ 47.389278] x17: 0000000000000000 x16: 0000000000000000
[ 47.395209] x15: 0000000000000400 x14: 0000000000000400
[ 47.401131] x13: 00000000000001a7 x12: 0000000000000000
[ 47.407053] x11: 0000000000000001 x10: 0000000000000960
[ 47.412976] x9 : ffff00000b17b9b0 x8 : ffff8000e48ea440
[ 47.418898] x7 : ffff8000ee9090c0 x6 : ffff8000f7d0b0b8
[ 47.424830] x5 : ffff8000f7d0b0b8 x4 : 0000000000000000
[ 47.430752] x3 : ffff8000f7d11e68 x2 : ffff8000e48e9a80
[ 47.436674] x1 : 37d859939c964800 x0 : 0000000000000000
[ 47.442597] Call trace:
[ 47.445324] device_release+0x80/0x90
[ 47.449414] kobject_put+0x74/0xe8
[ 47.453210] device_unregister+0x20/0x30
[ 47.457592] ec_device_remove+0x34/0x48 [cros_ec_dev]
[ 47.463233] platform_drv_remove+0x28/0x48
[ 47.467805] device_release_driver_internal+0x1a8/0x240
[ 47.473630] driver_detach+0x40/0x80
[ 47.477609] bus_remove_driver+0x54/0xa8
[ 47.481986] driver_unregister+0x2c/0x58
[ 47.486355] platform_driver_unregister+0x10/0x18
[ 47.491599] cros_ec_dev_exit+0x1c/0x258 [cros_ec_dev]
[ 47.497338] __arm64_sys_delete_module+0x16c/0x1f8
[ 47.502689] el0_svc_common+0x84/0xd8
[ 47.506776] el0_svc_handler+0x2c/0x80
[ 47.510960] el0_svc+0x8/0xc
[ 47.514171] ---[ end trace 9087279fc8c03450 ]---
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
Changes in v2:
- Fix WARN when unloading. This is new in these series.
drivers/mfd/cros_ec_dev.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
index 13b6dc26dc9a..bd561e91153a 100644
--- a/drivers/mfd/cros_ec_dev.c
+++ b/drivers/mfd/cros_ec_dev.c
@@ -35,9 +35,14 @@
#define CROS_MAX_DEV 128
static int ec_major;
+static void cros_ec_dev_release(struct device *dev)
+{
+}
+
static struct class cros_class = {
.owner = THIS_MODULE,
.name = "chromeos",
+ .dev_release = cros_ec_dev_release,
};
/* Basic communication */
--
2.19.1
prev parent reply other threads:[~2018-11-26 17:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-26 17:51 [PATCH v2 0/8] mfd / platform: cros_ec: move cros_ec sysfs attributes to its own drivers Enric Balletbo i Serra
2018-11-26 17:51 ` [PATCH v2 1/8] mfd / platform: cros_ec: use devm_mfd_add_devices Enric Balletbo i Serra
2018-11-26 17:58 ` Guenter Roeck
2018-11-26 17:51 ` [PATCH v2 2/8] mfd / platform: cros_ec: move lightbar attributes to its own driver Enric Balletbo i Serra
2018-11-26 17:51 ` [PATCH v2 3/8] mfd / platform: cros_ec: move vbc " Enric Balletbo i Serra
2018-11-26 20:06 ` kbuild test robot
2018-11-26 17:51 ` [PATCH v2 4/8] mfd / platform: cros_ec: move debugfs " Enric Balletbo i Serra
2018-11-26 17:51 ` [PATCH v2 5/8] mfd / platform: cros_ec: move device sysfs " Enric Balletbo i Serra
2018-11-26 17:51 ` [PATCH v2 6/8] mfd / platform: cros_ec: instantiate only if th EC has a VBC NVRAM Enric Balletbo i Serra
2018-11-26 17:51 ` [PATCH v2 7/8] platform/chrome: cros_ec_lightbar: instantiate only if the EC has a lightbar Enric Balletbo i Serra
2018-11-26 17:51 ` Enric Balletbo i Serra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181126175158.5425-9-enric.balletbo@collabora.com \
--to=enric.balletbo@collabora.com \
--cc=bleung@chromium.org \
--cc=drinkcat@chromium.org \
--cc=groeck@chromium.org \
--cc=gwendal@chromium.org \
--cc=kernel@collabora.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®