forked from Mirrors/opensbi
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:
@@ -58,12 +58,6 @@ static int sbi_ecall_dbcn_handler(unsigned long extid, unsigned long funcid,
|
||||
return SBI_ENOTSUPP;
|
||||
}
|
||||
|
||||
static int sbi_ecall_dbcn_probe(unsigned long extid, unsigned long *out_val)
|
||||
{
|
||||
*out_val = sbi_console_get_device() ? 1 : 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct sbi_ecall_extension ecall_dbcn;
|
||||
|
||||
static int sbi_ecall_dbcn_register_extensions(void)
|
||||
@@ -78,6 +72,5 @@ struct sbi_ecall_extension ecall_dbcn = {
|
||||
.extid_start = SBI_EXT_DBCN,
|
||||
.extid_end = SBI_EXT_DBCN,
|
||||
.register_extensions = sbi_ecall_dbcn_register_extensions,
|
||||
.probe = sbi_ecall_dbcn_probe,
|
||||
.handle = sbi_ecall_dbcn_handler,
|
||||
};
|
||||
|
Reference in New Issue
Block a user