mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 21:46:53 +07:00
drm/nouveau/iccsense: remove read function
Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Reviewed-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
7d28dbae22
commit
d03e0f2748
@ -12,6 +12,5 @@ struct nvkm_iccsense {
|
||||
};
|
||||
|
||||
int gf100_iccsense_new(struct nvkm_device *, int index, struct nvkm_iccsense **);
|
||||
int nvkm_iccsense_read(struct nvkm_iccsense *iccsense, u8 idx);
|
||||
int nvkm_iccsense_read_all(struct nvkm_iccsense *iccsense);
|
||||
#endif
|
||||
|
@ -95,27 +95,24 @@ nvkm_iccsense_ina3221_read(struct nvkm_iccsense *iccsense,
|
||||
40 * 8);
|
||||
}
|
||||
|
||||
int
|
||||
nvkm_iccsense_read(struct nvkm_iccsense *iccsense, u8 idx)
|
||||
{
|
||||
struct nvkm_iccsense_rail *rail;
|
||||
|
||||
if (!iccsense || idx >= iccsense->rail_count)
|
||||
return -EINVAL;
|
||||
|
||||
rail = &iccsense->rails[idx];
|
||||
if (!rail->read)
|
||||
return -ENODEV;
|
||||
|
||||
return rail->read(iccsense, rail);
|
||||
}
|
||||
|
||||
int
|
||||
nvkm_iccsense_read_all(struct nvkm_iccsense *iccsense)
|
||||
{
|
||||
int result = 0, i;
|
||||
|
||||
if (!iccsense)
|
||||
return -EINVAL;
|
||||
|
||||
if (iccsense->rail_count == 0)
|
||||
return -ENODEV;
|
||||
|
||||
for (i = 0; i < iccsense->rail_count; ++i) {
|
||||
int res = nvkm_iccsense_read(iccsense, i);
|
||||
int res;
|
||||
struct nvkm_iccsense_rail *rail = &iccsense->rails[i];
|
||||
if (!rail->read)
|
||||
return -ENODEV;
|
||||
|
||||
res = rail->read(iccsense, rail);
|
||||
if (res >= 0)
|
||||
result += res;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user