Commit 07f2c94d authored by Philipp Zabel's avatar Philipp Zabel

drm/imx: imx-tve: use regmap fast_io spinlock

Replace the custom spinlock with the fast_io spinlock provided by
regmap.
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent a28f9188
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <linux/spinlock.h>
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <video/imx-ipu-v3.h> #include <video/imx-ipu-v3.h>
...@@ -104,7 +103,6 @@ struct imx_tve { ...@@ -104,7 +103,6 @@ struct imx_tve {
struct drm_connector connector; struct drm_connector connector;
struct drm_encoder encoder; struct drm_encoder encoder;
struct device *dev; struct device *dev;
spinlock_t lock; /* register lock */
bool enabled; bool enabled;
int mode; int mode;
int di_hsync_pin; int di_hsync_pin;
...@@ -129,22 +127,6 @@ static inline struct imx_tve *enc_to_tve(struct drm_encoder *e) ...@@ -129,22 +127,6 @@ static inline struct imx_tve *enc_to_tve(struct drm_encoder *e)
return container_of(e, struct imx_tve, encoder); return container_of(e, struct imx_tve, encoder);
} }
static void tve_lock(void *__tve)
__acquires(&tve->lock)
{
struct imx_tve *tve = __tve;
spin_lock(&tve->lock);
}
static void tve_unlock(void *__tve)
__releases(&tve->lock)
{
struct imx_tve *tve = __tve;
spin_unlock(&tve->lock);
}
static void tve_enable(struct imx_tve *tve) static void tve_enable(struct imx_tve *tve)
{ {
if (!tve->enabled) { if (!tve->enabled) {
...@@ -500,8 +482,7 @@ static struct regmap_config tve_regmap_config = { ...@@ -500,8 +482,7 @@ static struct regmap_config tve_regmap_config = {
.readable_reg = imx_tve_readable_reg, .readable_reg = imx_tve_readable_reg,
.lock = tve_lock, .fast_io = true,
.unlock = tve_unlock,
.max_register = 0xdc, .max_register = 0xdc,
}; };
...@@ -544,7 +525,6 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data) ...@@ -544,7 +525,6 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data)
memset(tve, 0, sizeof(*tve)); memset(tve, 0, sizeof(*tve));
tve->dev = dev; tve->dev = dev;
spin_lock_init(&tve->lock);
ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0); ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0);
if (ddc_node) { if (ddc_node) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment