aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/regmap-mmio.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2013-12-31 11:51:02 -0500
committerJens Axboe <axboe@kernel.dk>2013-12-31 11:51:02 -0500
commitb28bc9b38c52f63f43e3fd875af982f2240a2859 (patch)
tree76cdb7b52b58f5685993cc15ed81d1c903023358 /drivers/base/regmap/regmap-mmio.c
parent8d30726912cb39c3a3ebde06214d54861f8fdde2 (diff)
parent802eee95bde72fd0cd0f3a5b2098375a487d1eda (diff)
Merge tag 'v3.13-rc6' into for-3.14/core
Needed to bring blk-mq uptodate, since changes have been going in since for-3.14/core was established. Fixup merge issues related to the immutable biovec changes. Signed-off-by: Jens Axboe <axboe@kernel.dk> Conflicts: block/blk-flush.c fs/btrfs/check-integrity.c fs/btrfs/extent_io.c fs/btrfs/scrub.c fs/logfs/dev_bdev.c
Diffstat (limited to 'drivers/base/regmap/regmap-mmio.c')
-rw-r--r--drivers/base/regmap/regmap-mmio.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap-mmio.c
index 98745dd77e8c..81f977510775 100644
--- a/drivers/base/regmap/regmap-mmio.c
+++ b/drivers/base/regmap/regmap-mmio.c
@@ -40,7 +40,7 @@ static int regmap_mmio_gather_write(void *context,
40 40
41 BUG_ON(reg_size != 4); 41 BUG_ON(reg_size != 4);
42 42
43 if (ctx->clk) { 43 if (!IS_ERR(ctx->clk)) {
44 ret = clk_enable(ctx->clk); 44 ret = clk_enable(ctx->clk);
45 if (ret < 0) 45 if (ret < 0)
46 return ret; 46 return ret;
@@ -73,7 +73,7 @@ static int regmap_mmio_gather_write(void *context,
73 offset += ctx->val_bytes; 73 offset += ctx->val_bytes;
74 } 74 }
75 75
76 if (ctx->clk) 76 if (!IS_ERR(ctx->clk))
77 clk_disable(ctx->clk); 77 clk_disable(ctx->clk);
78 78
79 return 0; 79 return 0;
@@ -96,7 +96,7 @@ static int regmap_mmio_read(void *context,
96 96
97 BUG_ON(reg_size != 4); 97 BUG_ON(reg_size != 4);
98 98
99 if (ctx->clk) { 99 if (!IS_ERR(ctx->clk)) {
100 ret = clk_enable(ctx->clk); 100 ret = clk_enable(ctx->clk);
101 if (ret < 0) 101 if (ret < 0)
102 return ret; 102 return ret;
@@ -129,7 +129,7 @@ static int regmap_mmio_read(void *context,
129 offset += ctx->val_bytes; 129 offset += ctx->val_bytes;
130 } 130 }
131 131
132 if (ctx->clk) 132 if (!IS_ERR(ctx->clk))
133 clk_disable(ctx->clk); 133 clk_disable(ctx->clk);
134 134
135 return 0; 135 return 0;
@@ -139,7 +139,7 @@ static void regmap_mmio_free_context(void *context)
139{ 139{
140 struct regmap_mmio_context *ctx = context; 140 struct regmap_mmio_context *ctx = context;
141 141
142 if (ctx->clk) { 142 if (!IS_ERR(ctx->clk)) {
143 clk_unprepare(ctx->clk); 143 clk_unprepare(ctx->clk);
144 clk_put(ctx->clk); 144 clk_put(ctx->clk);
145 } 145 }
@@ -209,6 +209,7 @@ static struct regmap_mmio_context *regmap_mmio_gen_context(struct device *dev,
209 209
210 ctx->regs = regs; 210 ctx->regs = regs;
211 ctx->val_bytes = config->val_bits / 8; 211 ctx->val_bytes = config->val_bits / 8;
212 ctx->clk = ERR_PTR(-ENODEV);
212 213
213 if (clk_id == NULL) 214 if (clk_id == NULL)
214 return ctx; 215 return ctx;