lib: sbi: Remove 0/1 probe implementations

When a probe implementation just returns zero for not available and
one for available then we don't need it, as the extension won't be
registered at all if it would return zero and the Base extension
probe function will already set out_val to 1 if not probe function
is implemented. Currently all probe functions only return zero or
one, so remove them all.

Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Andrew Jones
2023-05-15 13:12:39 +02:00
committed by Anup Patel
parent 767b5fc418
commit c3e31cbf36
4 changed files with 10 additions and 39 deletions

View File

@@ -49,12 +49,6 @@ static int sbi_ecall_cppc_handler(unsigned long extid, unsigned long funcid,
return ret;
}
static int sbi_ecall_cppc_probe(unsigned long extid, unsigned long *out_val)
{
*out_val = sbi_cppc_get_device() ? 1 : 0;
return 0;
}
struct sbi_ecall_extension ecall_cppc;
static int sbi_ecall_cppc_register_extensions(void)
@@ -69,6 +63,5 @@ struct sbi_ecall_extension ecall_cppc = {
.extid_start = SBI_EXT_CPPC,
.extid_end = SBI_EXT_CPPC,
.register_extensions = sbi_ecall_cppc_register_extensions,
.probe = sbi_ecall_cppc_probe,
.handle = sbi_ecall_cppc_handler,
};