Skip to content

Commit 311f328

Browse files
bryanbrattlofDaniel Lezcano
authored andcommitted
thermal/drivers/k3_j72xx_bandgap: Use bool for i2128 erratum flag
Some of TI's J721E SoCs require a software trimming method to report temperatures accurately. Currently we are using a few different data types to indicate when we should apply the erratum. Change the 'workaround_needed' variable's data type to a bool to align with how we are using this variable currently. Signed-off-by: Bryan Brattlof <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
1 parent 46cab93 commit 311f328

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/thermal/k3_j72xx_bandgap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ static void print_look_up_table(struct device *dev, int *ref_table)
340340
}
341341

342342
struct k3_j72xx_bandgap_data {
343-
unsigned int has_errata_i2128;
343+
const bool has_errata_i2128;
344344
};
345345

346346
static int k3_j72xx_bandgap_probe(struct platform_device *pdev)
@@ -351,7 +351,7 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev)
351351
struct device *dev = &pdev->dev;
352352
struct k3_j72xx_bandgap *bgp;
353353
struct k3_thermal_data *data;
354-
int workaround_needed = 0;
354+
bool workaround_needed = false;
355355
const struct k3_j72xx_bandgap_data *driver_data;
356356
struct thermal_zone_device *ti_thermal;
357357
int *ref_table;
@@ -522,11 +522,11 @@ static int k3_j72xx_bandgap_remove(struct platform_device *pdev)
522522
}
523523

524524
static const struct k3_j72xx_bandgap_data k3_j72xx_bandgap_j721e_data = {
525-
.has_errata_i2128 = 1,
525+
.has_errata_i2128 = true,
526526
};
527527

528528
static const struct k3_j72xx_bandgap_data k3_j72xx_bandgap_j7200_data = {
529-
.has_errata_i2128 = 0,
529+
.has_errata_i2128 = false,
530530
};
531531

532532
static const struct of_device_id of_k3_j72xx_bandgap_match[] = {

0 commit comments

Comments
 (0)