static const struct attribute_group *region_attr_groups[] = {
&nd_region_attribute_group,
- &nd_device_attribute_group,
&nd_mapping_attribute_group,
&nd_numa_attribute_group,
NULL,
static const struct attribute_group *papr_scm_dimm_groups[] = {
&nvdimm_attribute_group,
- &nd_device_attribute_group,
NULL,
};
static const struct attribute_group *acpi_nfit_dimm_attribute_groups[] = {
&nvdimm_attribute_group,
- &nd_device_attribute_group,
&acpi_nfit_dimm_attribute_group,
NULL,
};
static const struct attribute_group *acpi_nfit_region_attribute_groups[] = {
&nd_region_attribute_group,
&nd_mapping_attribute_group,
- &nd_device_attribute_group,
&nd_numa_attribute_group,
&acpi_nfit_region_attribute_group,
NULL,
/*
* nd_device_attribute_group - generic attributes for all devices on an nd bus
*/
-struct attribute_group nd_device_attribute_group = {
+const struct attribute_group nd_device_attribute_group = {
.attrs = nd_device_attributes,
};
-EXPORT_SYMBOL_GPL(nd_device_attribute_group);
static ssize_t numa_node_show(struct device *dev,
struct device_attribute *attr, char *buf)
kfree(nvdimm);
}
-static struct device_type nvdimm_device_type = {
+static const struct attribute_group *nvdimm_attribute_groups[] = {
+ &nd_device_attribute_group,
+ NULL,
+};
+
+static const struct device_type nvdimm_device_type = {
.name = "nvdimm",
.release = nvdimm_release,
+ .groups = nvdimm_attribute_groups,
};
bool is_nvdimm(struct device *dev)
static const struct attribute_group *e820_pmem_region_attribute_groups[] = {
&nd_region_attribute_group,
- &nd_device_attribute_group,
NULL,
};
void nvdimm_exit(void);
void nd_region_exit(void);
struct nvdimm;
+extern const struct attribute_group nd_device_attribute_group;
struct nvdimm_drvdata *to_ndd(struct nd_mapping *nd_mapping);
int nvdimm_check_config_data(struct device *dev);
int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd);
static const struct attribute_group *region_attr_groups[] = {
&nd_region_attribute_group,
- &nd_device_attribute_group,
NULL,
};
};
EXPORT_SYMBOL_GPL(nd_region_attribute_group);
-static struct device_type nd_blk_device_type = {
+static const struct attribute_group *nd_region_attribute_groups[] = {
+ &nd_device_attribute_group,
+ NULL,
+};
+
+static const struct device_type nd_blk_device_type = {
.name = "nd_blk",
.release = nd_region_release,
+ .groups = nd_region_attribute_groups,
};
-static struct device_type nd_pmem_device_type = {
+static const struct device_type nd_pmem_device_type = {
.name = "nd_pmem",
.release = nd_region_release,
+ .groups = nd_region_attribute_groups,
};
-static struct device_type nd_volatile_device_type = {
+static const struct device_type nd_volatile_device_type = {
.name = "nd_volatile",
.release = nd_region_release,
+ .groups = nd_region_attribute_groups,
};
bool is_nd_pmem(struct device *dev)
EXPORT_SYMBOL(nd_region_release_lane);
static struct nd_region *nd_region_create(struct nvdimm_bus *nvdimm_bus,
- struct nd_region_desc *ndr_desc, struct device_type *dev_type,
- const char *caller)
+ struct nd_region_desc *ndr_desc,
+ const struct device_type *dev_type, const char *caller)
{
struct nd_region *nd_region;
struct device *dev;
extern struct attribute_group nvdimm_bus_attribute_group;
extern struct attribute_group nvdimm_attribute_group;
-extern struct attribute_group nd_device_attribute_group;
extern struct attribute_group nd_numa_attribute_group;
extern struct attribute_group nd_region_attribute_group;
extern struct attribute_group nd_mapping_attribute_group;