static ssize_t base_image_show(struct device *device, struct device_attribute *attr, char *buf) { struct cxl *adapter = to_cxl_adapter(device); return scnprintf(buf, PAGE_SIZE, "%i\n", adapter->base_image); }
static ssize_t psl_revision_show(struct device *device, struct device_attribute *attr, char *buf) { struct cxl *adapter = to_cxl_adapter(device); return scnprintf(buf, PAGE_SIZE, "%i\n", adapter->psl_rev); }
static void cxl_release_adapter(struct device *dev) { struct cxl *adapter = to_cxl_adapter(dev); pr_devel("cxl_release_adapter\n"); kfree(adapter); }
static ssize_t caia_version_show(struct device *device, struct device_attribute *attr, char *buf) { struct cxl *adapter = to_cxl_adapter(device); return scnprintf(buf, PAGE_SIZE, "%i.%i\n", adapter->caia_major, adapter->caia_minor); }
static ssize_t image_loaded_show(struct device *device, struct device_attribute *attr, char *buf) { struct cxl *adapter = to_cxl_adapter(device); if (adapter->user_image_loaded) return scnprintf(buf, PAGE_SIZE, "user\n"); return scnprintf(buf, PAGE_SIZE, "factory\n"); }