]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bug fix: Fix section mismatch problem of release_firmware_map_entry().
authorTang Chen <tangchen@cn.fujitsu.com>
Wed, 20 Feb 2013 02:14:12 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:28 +0000 (16:52 +1100)
The function release_firmware_map_entry() references the function
__meminit firmware_map_find_entry_in_list(). So it should also have
__meminit.

And since the firmware_map_entry->kobj is initialized with memmap_ktype,
the memmap_ktype should also be prefixed by __refdata.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/firmware/memmap.c

index 071017918a5712e612b0a1593546a64b3c800552..658fdd485cdd7bcda663725a9168535fb7da37d8 100644 (file)
@@ -103,7 +103,7 @@ to_memmap_entry(struct kobject *kobj)
        return container_of(kobj, struct firmware_map_entry, kobj);
 }
 
-static void release_firmware_map_entry(struct kobject *kobj)
+static void __meminit release_firmware_map_entry(struct kobject *kobj)
 {
        struct firmware_map_entry *entry = to_memmap_entry(kobj);
 
@@ -127,7 +127,7 @@ static void release_firmware_map_entry(struct kobject *kobj)
        kfree(entry);
 }
 
-static struct kobj_type memmap_ktype = {
+static struct kobj_type __refdata memmap_ktype = {
        .release        = release_firmware_map_entry,
        .sysfs_ops      = &memmap_attr_ops,
        .default_attrs  = def_attrs,