[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130607144936.6ea0c2d9a7fcf321e59cc6d6@canb.auug.org.au>
Date: Fri, 7 Jun 2013 14:49:36 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Greg KH <greg@...ah.com>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Nathan Fontenot <nfont@...ux.vnet.ibm.com>,
"Rafael J. Wysocki" <rjw@...k.pl>
Subject: linux-next: manual merge of the driver-core tree with the pm tree
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@...b.auug.org.au
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)
{
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists