From: Peter Rosin <peda@lysator.liu.se>
To: linux-kernel@vger.kernel.org
Cc: Peter Rosin <peda@axentia.se>, Wolfram Sang <wsa@the-dreams.de>,
Jonathan Corbet <corbet@lwn.net>,
Peter Korsgaard <peter.korsgaard@barco.com>,
Guenter Roeck <linux@roeck-us.net>,
Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Antti Palosaari <crope@iki.fi>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Grant Likely <grant.likely@linaro.org>,
Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"David S. Miller" <davem@davemloft.net>,
Kalle Valo <kvalo@codeaurora.org>, Joe Perches <joe@perches.com>,
Jiri Slaby <jslaby@suse.com>,
Daniel Baluta <daniel.baluta@intel.com>,
Adriana Reus <adriana.reus@intel.com>,
Lucas De Marchi <lucas.demarchi@intel.com>,
Mat
Subject: [PATCH v6 24/24] [media] rtl2832: regmap is aware of lockdep, drop local locking hack
Date: Sun, 3 Apr 2016 10:52:54 +0200 [thread overview]
Message-ID: <1459673574-11440-25-git-send-email-peda@lysator.liu.se> (raw)
In-Reply-To: <1459673574-11440-1-git-send-email-peda@lysator.liu.se>
From: Peter Rosin <peda@axentia.se>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Peter Rosin <peda@axentia.se>
---
drivers/media/dvb-frontends/rtl2832.c | 30 ------------------------------
drivers/media/dvb-frontends/rtl2832_priv.h | 1 -
2 files changed, 31 deletions(-)
diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c
index ac5ac5f7a335..23459fed2516 100644
--- a/drivers/media/dvb-frontends/rtl2832.c
+++ b/drivers/media/dvb-frontends/rtl2832.c
@@ -890,32 +890,6 @@ static bool rtl2832_volatile_reg(struct device *dev, unsigned int reg)
return false;
}
-/*
- * FIXME: Hack. Implement own regmap locking in order to silence lockdep
- * recursive lock warning. That happens when regmap I2C client calls I2C mux
- * adapter, which leads demod I2C repeater enable via demod regmap. Operation
- * takes two regmap locks recursively - but those are different regmap instances
- * in a two different I2C drivers, so it is not deadlock. Proper fix is to make
- * regmap aware of lockdep.
- */
-static void rtl2832_regmap_lock(void *__dev)
-{
- struct rtl2832_dev *dev = __dev;
- struct i2c_client *client = dev->client;
-
- dev_dbg(&client->dev, "\n");
- mutex_lock(&dev->regmap_mutex);
-}
-
-static void rtl2832_regmap_unlock(void *__dev)
-{
- struct rtl2832_dev *dev = __dev;
- struct i2c_client *client = dev->client;
-
- dev_dbg(&client->dev, "\n");
- mutex_unlock(&dev->regmap_mutex);
-}
-
static struct dvb_frontend *rtl2832_get_dvb_frontend(struct i2c_client *client)
{
struct rtl2832_dev *dev = i2c_get_clientdata(client);
@@ -1082,12 +1056,8 @@ static int rtl2832_probe(struct i2c_client *client,
dev->sleeping = true;
INIT_DELAYED_WORK(&dev->i2c_gate_work, rtl2832_i2c_gate_work);
/* create regmap */
- mutex_init(&dev->regmap_mutex);
dev->regmap_config.reg_bits = 8,
dev->regmap_config.val_bits = 8,
- dev->regmap_config.lock = rtl2832_regmap_lock,
- dev->regmap_config.unlock = rtl2832_regmap_unlock,
- dev->regmap_config.lock_arg = dev,
dev->regmap_config.volatile_reg = rtl2832_volatile_reg,
dev->regmap_config.max_register = 5 * 0x100,
dev->regmap_config.ranges = regmap_range_cfg,
diff --git a/drivers/media/dvb-frontends/rtl2832_priv.h b/drivers/media/dvb-frontends/rtl2832_priv.h
index d8f97d14f6fd..c1a8a69e9015 100644
--- a/drivers/media/dvb-frontends/rtl2832_priv.h
+++ b/drivers/media/dvb-frontends/rtl2832_priv.h
@@ -33,7 +33,6 @@
struct rtl2832_dev {
struct rtl2832_platform_data *pdata;
struct i2c_client *client;
- struct mutex regmap_mutex;
struct regmap_config regmap_config;
struct regmap *regmap;
struct i2c_mux_core *muxc;
--
2.1.4
prev parent reply other threads:[~2016-04-03 8:52 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-03 8:52 [PATCH v6 00/24] i2c mux cleanup and locking update Peter Rosin
2016-04-03 8:52 ` [PATCH v6 02/24] i2c: i2c-mux-gpio: convert to use an explicit i2c mux core Peter Rosin
2016-04-03 8:52 ` [PATCH v6 03/24] i2c: i2c-mux-pinctrl: " Peter Rosin
2016-04-03 8:52 ` [PATCH v6 04/24] i2c: i2c-arb-gpio-challenge: " Peter Rosin
2016-04-03 8:52 ` [PATCH v6 05/24] i2c: i2c-mux-pca9541: " Peter Rosin
2016-04-03 8:52 ` [PATCH v6 06/24] i2c: i2c-mux-pca954x: " Peter Rosin
2016-04-03 8:52 ` [PATCH v6 07/24] i2c: i2c-mux-reg: " Peter Rosin
2016-04-03 8:52 ` [PATCH v6 08/24] iio: imu: inv_mpu6050: " Peter Rosin
[not found] ` <1459673574-11440-9-git-send-email-peda-SamgB31n2u5IcsJQ0EH25Q@public.gmane.org>
2016-04-03 10:51 ` Jonathan Cameron
2016-04-03 11:51 ` Peter Rosin
[not found] ` <570103AE.1020707-SamgB31n2u5IcsJQ0EH25Q@public.gmane.org>
2016-04-10 14:12 ` Jonathan Cameron
2016-04-19 15:58 ` Crestez Dan Leonard
2016-04-19 16:37 ` Peter Rosin
2016-04-03 8:52 ` [PATCH v6 11/24] [media] rtl2832: " Peter Rosin
2016-04-03 8:52 ` [PATCH v6 12/24] [media] si2168: " Peter Rosin
2016-04-03 8:52 ` [PATCH v6 13/24] [media] cx231xx: " Peter Rosin
[not found] ` <1459673574-11440-1-git-send-email-peda-SamgB31n2u5IcsJQ0EH25Q@public.gmane.org>
2016-04-03 8:52 ` [PATCH v6 01/24] i2c-mux: add common data for every i2c-mux instance Peter Rosin
2016-04-11 20:46 ` Wolfram Sang
2016-04-13 13:37 ` Peter Rosin
[not found] ` <570E4BAE.7060108-SamgB31n2u5IcsJQ0EH25Q@public.gmane.org>
2016-04-15 11:23 ` Wolfram Sang
2016-04-03 8:52 ` [PATCH v6 09/24] [media] m88ds3103: convert to use an explicit i2c mux core Peter Rosin
2016-04-03 8:52 ` [PATCH v6 10/24] [media] rtl2830: " Peter Rosin
2016-04-03 8:52 ` [PATCH v6 14/24] of/unittest: " Peter Rosin
2016-04-04 5:16 ` Rob Herring
2016-04-05 7:42 ` Peter Rosin
2016-04-11 12:39 ` [PATCH v6 00/24] i2c mux cleanup and locking update Wolfram Sang
2016-04-11 13:36 ` Peter Rosin
[not found] ` <570BA845.1060309-SamgB31n2u5IcsJQ0EH25Q@public.gmane.org>
2016-04-11 15:59 ` Wolfram Sang
2016-04-03 8:52 ` [PATCH v6 15/24] i2c-mux: drop old unused i2c-mux api Peter Rosin
2016-04-03 8:52 ` [PATCH v6 16/24] i2c: allow adapter drivers to override the adapter locking Peter Rosin
2016-04-03 8:52 ` [PATCH v6 17/24] i2c: muxes always lock the parent adapter Peter Rosin
2016-04-03 8:52 ` [PATCH v6 18/24] i2c-mux: relax locking of the top i2c adapter during mux-locked muxing Peter Rosin
2016-04-03 8:52 ` [PATCH v6 19/24] i2c-mux: document i2c muxes and elaborate on parent-/mux-locked muxes Peter Rosin
2016-04-03 11:09 ` Jonathan Cameron
2016-04-05 7:50 ` Peter Rosin
2016-04-03 8:52 ` [PATCH v6 20/24] iio: imu: inv_mpu6050: change the i2c gate to be mux-locked Peter Rosin
2016-04-03 10:54 ` Jonathan Cameron
[not found] ` <5700F648.1010804-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-04-18 7:37 ` Daniel Baluta
2016-04-03 8:52 ` [PATCH v6 21/24] [media] si2168: " Peter Rosin
2016-04-03 8:52 ` [PATCH v6 22/24] [media] rtl2832: " Peter Rosin
2016-04-03 8:52 ` [PATCH v6 23/24] [media] rtl2832_sdr: get rid of empty regmap wrappers Peter Rosin
2016-04-03 8:52 ` Peter Rosin [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=1459673574-11440-25-git-send-email-peda@lysator.liu.se \
--to=peda@lysator.liu.se \
--cc=adriana.reus@intel.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=crope@iki.fi \
--cc=daniel.baluta@intel.com \
--cc=davem@davemloft.net \
--cc=frowand.list@gmail.com \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=joe@perches.com \
--cc=jslaby@suse.com \
--cc=knaack.h@gmx.de \
--cc=kvalo@codeaurora.org \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lucas.demarchi@intel.com \
--cc=mchehab@osg.samsung.com \
--cc=peda@axentia.se \
--cc=peter.korsgaard@barco.com \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).