drivers/platform/x86/hp/hp-bioscfg/surestart-attributes.c

Source file repositories/reference/linux-study-clean/drivers/platform/x86/hp/hp-bioscfg/surestart-attributes.c

File Facts

System
Linux kernel
Corpus path
drivers/platform/x86/hp/hp-bioscfg/surestart-attributes.c
Extension
.c
Size
3376 bytes
Lines
133
Domain
Driver Families
Bucket
drivers/platform
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (ret < 0 || (LOG_ENTRY_SIZE * i) > PAGE_SIZE) {
			/*
			 * Encountered a failure while reading
			 * individual logs. Only a partial list of
			 * audit log will be returned.
			 */
			break;
		} else {
			memcpy(buf, audit_log_buffer, LOG_ENTRY_SIZE);
			buf += LOG_ENTRY_SIZE;
		}
	}

	return i * LOG_ENTRY_SIZE;
}

static struct kobj_attribute sure_start_audit_log_entry_count = __ATTR_RO(audit_log_entry_count);
static struct kobj_attribute sure_start_audit_log_entries = __ATTR_RO(audit_log_entries);

static struct attribute *sure_start_attrs[] = {
	&sure_start_audit_log_entry_count.attr,
	&sure_start_audit_log_entries.attr,
	NULL
};

static const struct attribute_group sure_start_attr_group = {
	.attrs = sure_start_attrs,
};

void hp_exit_sure_start_attributes(void)
{
	sysfs_remove_group(bioscfg_drv.sure_start_attr_kobj,
			   &sure_start_attr_group);
}

int hp_populate_sure_start_data(struct kobject *attr_name_kobj)
{
	bioscfg_drv.sure_start_attr_kobj = attr_name_kobj;
	return sysfs_create_group(attr_name_kobj, &sure_start_attr_group);
}

Annotation

Implementation Notes