mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
cpu: clean up
Change read_file to spa_cpu_read_file and remove static because it might not be used for some cpus. Use spa_cpu_read_file in arm cpu detection.
This commit is contained in:
parent
bba452695e
commit
da26563a83
2 changed files with 4 additions and 27 deletions
|
|
@ -59,7 +59,7 @@ struct impl {
|
|||
uint32_t vm_type;
|
||||
};
|
||||
|
||||
static char *read_file(const char *name, char *buffer, size_t len)
|
||||
char *spa_cpu_read_file(const char *name, char *buffer, size_t len)
|
||||
{
|
||||
int n, fd;
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ impl_cpu_get_vm_type(void *object)
|
|||
SPA_FOR_EACH_ELEMENT_VAR(dmi_vendors, dv) {
|
||||
char buffer[256], *s;
|
||||
|
||||
if ((s = read_file(*dv, buffer, sizeof(buffer))) == NULL)
|
||||
if ((s = spa_cpu_read_file(*dv, buffer, sizeof(buffer))) == NULL)
|
||||
continue;
|
||||
|
||||
SPA_FOR_EACH_ELEMENT_VAR(dmi_vendor_table, t) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue