linux-next: manual merge of the driver-core tree with the pm tree

From: Stephen Rothwell
Date: Fri Jun 07 2013 - 00:49:55 EST


Hi Greg,

Today's linux-next merge of the driver-core tree got a conflict in
drivers/base/memory.c between commit 4960e05e2260 ("Driver core:
Introduce offline/online callbacks for memory blocks") from the pm tree
and commit 96b2c0fc8e74 ("drivers/base: Use attribute groups to create
sysfs memory files") from the driver-core tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc drivers/base/memory.c
index 4ebf97f,e315051..0000000
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@@ -595,6 -493,41 +541,42 @@@ struct memory_block *find_memory_block(
return find_memory_block_hinted(section, NULL);
}

+ static struct attribute *memory_memblk_attrs[] = {
+ &dev_attr_phys_index.attr,
+ &dev_attr_end_phys_index.attr,
+ &dev_attr_state.attr,
+ &dev_attr_phys_device.attr,
+ &dev_attr_removable.attr,
+ NULL
+ };
+
+ static struct attribute_group memory_memblk_attr_group = {
+ .attrs = memory_memblk_attrs,
+ };
+
+ static const struct attribute_group *memory_memblk_attr_groups[] = {
+ &memory_memblk_attr_group,
+ NULL,
+ };
+
+ /*
+ * register_memory - Setup a sysfs device for a memory block
+ */
+ static
+ int register_memory(struct memory_block *memory)
+ {
+ int error;
+
+ memory->dev.bus = &memory_subsys;
+ memory->dev.id = memory->start_section_nr / sections_per_block;
+ memory->dev.release = memory_block_release;
+ memory->dev.groups = memory_memblk_attr_groups;
++ memory->dev.offline = memory->state == MEM_OFFLINE;
+
+ error = device_register(&memory->dev);
+ return error;
+ }
+
static int init_memory_block(struct memory_block **memory,
struct mem_section *section, unsigned long state)
{

Attachment: pgp00000.pgp
Description: PGP signature