Skip to content

Commit f29ca8f

Browse files
masneybherbertx
authored andcommitted
crypto: qcom-rng - rename *_of_data to *_match_data
The qcom-rng driver supports both ACPI and device tree based systems. Let's rename all instances of *of_data to *match_data so that it's not implied that this driver only supports device tree-based systems. Signed-off-by: Brian Masney <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 3e87031 commit f29ca8f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

drivers/crypto/qcom-rng.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ struct qcom_rng {
3636
void __iomem *base;
3737
struct clk *clk;
3838
struct hwrng hwrng;
39-
struct qcom_rng_of_data *of_data;
39+
struct qcom_rng_match_data *match_data;
4040
};
4141

4242
struct qcom_rng_ctx {
4343
struct qcom_rng *rng;
4444
};
4545

46-
struct qcom_rng_of_data {
46+
struct qcom_rng_match_data {
4747
bool skip_init;
4848
bool hwrng_support;
4949
};
@@ -155,7 +155,7 @@ static int qcom_rng_init(struct crypto_tfm *tfm)
155155

156156
ctx->rng = qcom_rng_dev;
157157

158-
if (!ctx->rng->of_data->skip_init)
158+
if (!ctx->rng->match_data->skip_init)
159159
return qcom_rng_enable(ctx->rng);
160160

161161
return 0;
@@ -196,7 +196,7 @@ static int qcom_rng_probe(struct platform_device *pdev)
196196
if (IS_ERR(rng->clk))
197197
return PTR_ERR(rng->clk);
198198

199-
rng->of_data = (struct qcom_rng_of_data *)device_get_match_data(&pdev->dev);
199+
rng->match_data = (struct qcom_rng_match_data *)device_get_match_data(&pdev->dev);
200200

201201
qcom_rng_dev = rng;
202202
ret = crypto_register_rng(&qcom_rng_alg);
@@ -206,7 +206,7 @@ static int qcom_rng_probe(struct platform_device *pdev)
206206
return ret;
207207
}
208208

209-
if (rng->of_data->hwrng_support) {
209+
if (rng->match_data->hwrng_support) {
210210
rng->hwrng.name = "qcom_hwrng";
211211
rng->hwrng.read = qcom_hwrng_read;
212212
rng->hwrng.quality = QCOM_TRNG_QUALITY;
@@ -231,31 +231,31 @@ static void qcom_rng_remove(struct platform_device *pdev)
231231
qcom_rng_dev = NULL;
232232
}
233233

234-
static struct qcom_rng_of_data qcom_prng_of_data = {
234+
static struct qcom_rng_match_data qcom_prng_match_data = {
235235
.skip_init = false,
236236
.hwrng_support = false,
237237
};
238238

239-
static struct qcom_rng_of_data qcom_prng_ee_of_data = {
239+
static struct qcom_rng_match_data qcom_prng_ee_match_data = {
240240
.skip_init = true,
241241
.hwrng_support = false,
242242
};
243243

244-
static struct qcom_rng_of_data qcom_trng_of_data = {
244+
static struct qcom_rng_match_data qcom_trng_match_data = {
245245
.skip_init = true,
246246
.hwrng_support = true,
247247
};
248248

249249
static const struct acpi_device_id __maybe_unused qcom_rng_acpi_match[] = {
250-
{ .id = "QCOM8160", .driver_data = (kernel_ulong_t)&qcom_prng_ee_of_data },
250+
{ .id = "QCOM8160", .driver_data = (kernel_ulong_t)&qcom_prng_ee_match_data },
251251
{}
252252
};
253253
MODULE_DEVICE_TABLE(acpi, qcom_rng_acpi_match);
254254

255255
static const struct of_device_id __maybe_unused qcom_rng_of_match[] = {
256-
{ .compatible = "qcom,prng", .data = &qcom_prng_of_data },
257-
{ .compatible = "qcom,prng-ee", .data = &qcom_prng_ee_of_data },
258-
{ .compatible = "qcom,trng", .data = &qcom_trng_of_data },
256+
{ .compatible = "qcom,prng", .data = &qcom_prng_match_data },
257+
{ .compatible = "qcom,prng-ee", .data = &qcom_prng_ee_match_data },
258+
{ .compatible = "qcom,trng", .data = &qcom_trng_match_data },
259259
{}
260260
};
261261
MODULE_DEVICE_TABLE(of, qcom_rng_of_match);

0 commit comments

Comments
 (0)