diff options
-rw-r--r-- | Documentation/ja_JP/stable_kernel_rules.txt | 106 | ||||
-rw-r--r-- | Documentation/stable_kernel_rules.txt | 7 | ||||
-rw-r--r-- | Documentation/vm/slabinfo.c | 2 | ||||
-rw-r--r-- | drivers/base/bus.c | 9 | ||||
-rw-r--r-- | drivers/base/driver.c | 3 | ||||
-rw-r--r-- | drivers/base/power/main.c | 2 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 8 | ||||
-rw-r--r-- | drivers/ide/ide.c | 2 | ||||
-rw-r--r-- | drivers/uio/uio.c | 54 | ||||
-rw-r--r-- | kernel/module.c | 7 |
10 files changed, 108 insertions, 92 deletions
diff --git a/Documentation/ja_JP/stable_kernel_rules.txt b/Documentation/ja_JP/stable_kernel_rules.txt index 17d87519e468..b3ffe870de33 100644 --- a/Documentation/ja_JP/stable_kernel_rules.txt +++ b/Documentation/ja_JP/stable_kernel_rules.txt | |||
@@ -11,69 +11,69 @@ comment or update of this file, please try to update Original(English) | |||
11 | file at first. | 11 | file at first. |
12 | 12 | ||
13 | ================================== | 13 | ================================== |
14 | ãããã | 14 | |
15 | linux-2.6.24/Documentation/stable_kernel_rules.txt | 15 | linux-2.6.24/Documentation/stable_kernel_rules.txt |
16 | ãå¨ããã | 16 | |
17 | 17 | ||
18 | ç¨åäï JF ãããããã < http://www.linux.or.jp/JF/ > | 18 | JF < http://www.linux.or.jp/JF/ > |
19 | ç¨æï 2007/12/30 | 19 | 2007/12/30 |
20 | ç¨èï Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> | 20 | Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> |
21 | ææèï æääåããã<takei at webmasters dot gr dot jp> | 21 | <takei at webmasters dot gr dot jp> |
22 | ããããã (Seiji Kaneko) <skaneko at a2 dot mbn dot or dot jp> | 22 | (Seiji Kaneko) <skaneko at a2 dot mbn dot or dot jp> |
23 | åæ éåãã (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp> | 23 | (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp> |
24 | éåãã (Kenji Noguchi) <tokyo246 at gmail dot com> | 24 | (Kenji Noguchi) <tokyo246 at gmail dot com> |
25 | çåäåéãã <jin at libjingu dot jp> | 25 | <jin at libjingu dot jp> |
26 | ================================== | 26 | ================================== |
27 | 27 | ||
28 | ãããçããããã Linux 2.6 -stable ãããããåã | 28 | Linux 2.6 -stable |
29 | 29 | ||
30 | "-stable" ããªã¼ã«ã©ã®ãããªç¨®é¡ã®ããããåãå ¥ããããããã©ã®ãã㪠| 30 | "-stable" ツリーにどのような種類のパッチが受け入れられるか、どのような |
31 | ãããåãåããããããããããããèå- | 31 | - |
32 | 32 | ||
33 | - æããã«æ£ããããã¹ãããã¦ãããã®ã§ãªããã°ãªããªãã | 33 | - 明らかに正しく、テストされているものでなければならない。 |
34 | - æè(å¤æ´è¡ã®åå¾)ãå«ã㦠100 è¡ãã大ããã¦ã¯ãããªãã | 34 | - 文脈(変更行の前後)を含めて 100 行より大きくてはいけない。 |
35 | - ããäåããããããäæããããããã | 35 | - |
36 | - çãæ©ã¾ãã¦ããæ¬ç©ã®ãã°ãä¿®æ£ããªããã°ãªããªãã("ããã¯ãã°ã§ | 36 | - 皆を悩ませている本物のバグを修正しなければならない。("これはバグで |
37 | ããããããããã..." ãããããããããã) | 37 | ..." ) |
38 | - ãã«ãã¨ã©ã¼(CONFIG_BROKENã«ãªã£ã¦ãããã®ãé¤ã), oops, ãã³ã°ããã¼ | 38 | - ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー |
39 | ã¿ç ´å£ãç¾å®ã®ã»ãã¥ãªãã£åé¡ããã®ä» "ãããããã¯ãã¡ã ã"ã¨ãã | 39 | タ破壊、現実のセキュリティ問題、その他 "ああ、これはダメだね"という |
40 | ãããªãã®ãä¿®æ£ããªããã°ãªããªããçãè¨ãã°ãé大ãªåé¡ã | 40 | ようなものを修正しなければならない。短く言えば、重大な問題。 |
41 | - ã©ã®ããã«ç«¶åç¶æ ãçºçãããã®èª¬æãä¸ç·ã«æ¸ããã¦ããªãéãã | 41 | - どのように競合状態が発生するかの説明も一緒に書かれていない限り、 |
42 | "çè«çã«ã¯ç«¶åç¶æ ã«ãªã"ãããªãã®ã¯ä¸å¯ã | 42 | "理論的には競合状態になる"ようなものは不可。 |
43 | - ãããªãäºç´°ãªä¿®æ£ãå«ãããã¨ã¯ã§ããªãã(ã¹ãã«ã®ä¿®æ£ã空ç½ã®ã¯ãªã¼ | 43 | - いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー |
44 | ãããããã) | 44 | ) |
45 | - 対å¿ãããµãã·ã¹ãã ã¡ã³ãããåãå ¥ãããã®ã§ãªããã°ãªããªãã | 45 | - 対応するサブシステムメンテナが受け入れたものでなければならない。 |
46 | - Documentation/SubmittingPatches ã®è¦åã«å¾ã£ããã®ã§ãªããã°ãªããªãã | 46 | - Documentation/SubmittingPatches の規則に従ったものでなければならない。 |
47 | 47 | ||
48 | -stable ããããããããéäããæçã- | 48 | -stable - |
49 | 49 | ||
50 | - ä¸è¨ã®è¦åã«å¾ã£ã¦ãããã確èªããå¾ã«ãstable@kernel.org ã«ããã | 50 | - 上記の規則に従っているかを確認した後に、stable@kernel.org にパッチ |
51 | ãéãã | 51 | |
52 | - éä¿¡è ã¯ãããããã¥ã¼ã«åãä»ããããéã«ã¯ ACK ããå´ä¸ãããå ´å | 52 | - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合 |
53 | ã«ã¯ NAK ãåãåãããã®åå¿ã¯éçºè ãã¡ã®ã¹ã±ã¸ã¥ã¼ã«ã«ãã£ã¦ãæ° | 53 | には NAK を受け取る。この反応は開発者たちのスケジュールによって、数 |
54 | æãããååãããã | 54 | |
55 | - ããåãåããããããããã¯ä»ã®éçºè ãã¡ã®ã¬ãã¥ã¼ã®ããã« | 55 | - もし受け取られたら、パッチは他の開発者たちのレビューのために |
56 | -stable ããããèåãããã | 56 | -stable |
57 | - ã»ãã¥ãªãã£ãããã¯ãã®ã¨ã¤ãªã¢ã¹ (stable@kernel.org) ã«éãããã¹ | 57 | - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ |
58 | ãã§ã¯ãªãã代ããã« security@kernel.org ã®ã¢ãã¬ã¹ã«éãããã | 58 | きではなく、代わりに security@kernel.org のアドレスに送られる。 |
59 | 59 | ||
60 | ãããããããã- | 60 | - |
61 | 61 | ||
62 | - -stable ã¡ã³ãããã¬ãã¥ã¼ãµã¤ã¯ã«ã決ããã¨ãããããã¯ã¬ãã¥ã¼å§ | 62 | - -stable メンテナがレビューサイクルを決めるとき、パッチはレビュー委 |
63 | å¡ä¼ã¨ããããå½±é¿ããé åã®ã¡ã³ãã(æä¾è ããã®é åã®ã¡ã³ããã§ç¡ | 63 | 員会とパッチが影響する領域のメンテナ(提供者がその領域のメンテナで無 |
64 | ãéã)ã«éãããlinux-kernel ã¡ã¼ãªã³ã°ãªã¹ãã«CCãããã | 64 | い限り)に送られ、linux-kernel メーリングリストにCCされる。 |
65 | - ããããååäã 48æéãéã ACK ã NAK ãåãã | 65 | - 48 ACK NAK |
66 | - ããããããå§å¡ä¼ã®ã¡ã³ãããå´ä¸ããããã¡ã³ããéãã¡ã³ããæ°ä» | 66 | - もしパッチが委員会のメンバから却下されるか、メンテナ達やメンバが気付 |
67 | ããªãã£ãåé¡ãæã¡ããããlinux-kernel ã¡ã³ãããããã«ç°è°ãå±ã | 67 | かなかった問題が持ちあがり、linux-kernel メンバがパッチに異議を唱え |
68 | ãå ´åã«ã¯ããããã¯ãã¥ã¼ããåé¤ãããã | 68 | た場合には、パッチはキューから削除される。 |
69 | - ã¬ãã¥ã¼ãµã¤ã¯ã«ã®æå¾ã«ãACK ãåãããããã¯ææ°ã® -stable ãªãªã¼ | 69 | - レビューサイクルの最後に、ACK を受けたパッチは最新の -stable リリー |
70 | ã¹ã«è¿½å ããããã®å¾ã«æ°ãã -stable ãªãªã¼ã¹ãè¡ãããã | 70 | スに追加され、その後に新しい -stable リリースが行われる。 |
71 | - ã»ãã¥ãªãã£ãããã¯ãé常ã®ã¬ãã¥ã¼ãµã¤ã¯ã«ãéãããã»ãã¥ãªã㣠| 71 | - セキュリティパッチは、通常のレビューサイクルを通らず、セキュリティ |
72 | ã«ã¼ãã«ãã¼ã ããç´æ¥ -stable ããªã¼ã«åãä»ããããã | 72 | カーネルチームから直接 -stable ツリーに受け付けられる。 |
73 | ãã®æç¶ãã®è©³ç´°ã«ã¤ãã¦ã¯ kernel security ãã¼ã ã«åãåããããã¨ã | 73 | この手続きの詳細については kernel security チームに問い合わせること。 |
74 | 74 | ||
75 | ããããååä- | 75 | - |
76 | 76 | ||
77 | - ãã®å§å¡ä¼ã¯ããã®ã¿ã¹ã¯ã«ã¤ãã¦æ´»åããå¤ãã®ãã©ã³ãã£ã¢ã¨ãå°æ°ã® | 77 | - この委員会は、このタスクについて活動する多くのボランティアと、少数の |
78 | éãã©ã³ãã£ã¢ã®ã«ã¼ãã«éçºè éã§æ§æããã¦ããã | 78 | 非ボランティアのカーネル開発者達で構成されている。 |
79 | 79 | ||
diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt index c815c5206e84..4cfc78835bc1 100644 --- a/Documentation/stable_kernel_rules.txt +++ b/Documentation/stable_kernel_rules.txt | |||
@@ -16,8 +16,9 @@ Rules on what kind of patches are accepted, and which ones are not, into the | |||
16 | race can be exploited is also provided. | 16 | race can be exploited is also provided. |
17 | - It cannot contain any "trivial" fixes in it (spelling changes, | 17 | - It cannot contain any "trivial" fixes in it (spelling changes, |
18 | whitespace cleanups, etc). | 18 | whitespace cleanups, etc). |
19 | - It must be accepted by the relevant subsystem maintainer. | ||
20 | - It must follow the Documentation/SubmittingPatches rules. | 19 | - It must follow the Documentation/SubmittingPatches rules. |
20 | - It or an equivalent fix must already exist in Linus' tree. Quote the | ||
21 | respective commit ID in Linus' tree in your patch submission to -stable. | ||
21 | 22 | ||
22 | 23 | ||
23 | Procedure for submitting patches to the -stable tree: | 24 | Procedure for submitting patches to the -stable tree: |
@@ -28,7 +29,9 @@ Procedure for submitting patches to the -stable tree: | |||
28 | queue, or a NAK if the patch is rejected. This response might take a few | 29 | queue, or a NAK if the patch is rejected. This response might take a few |
29 | days, according to the developer's schedules. | 30 | days, according to the developer's schedules. |
30 | - If accepted, the patch will be added to the -stable queue, for review by | 31 | - If accepted, the patch will be added to the -stable queue, for review by |
31 | other developers. | 32 | other developers and by the relevant subsystem maintainer. |
33 | - If the stable@kernel.org address is added to a patch, when it goes into | ||
34 | Linus's tree it will automatically be emailed to the stable team. | ||
32 | - Security patches should not be sent to this alias, but instead to the | 35 | - Security patches should not be sent to this alias, but instead to the |
33 | documented security@kernel.org address. | 36 | documented security@kernel.org address. |
34 | 37 | ||
diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c index 7123fee708ca..22d7e3e4d60c 100644 --- a/Documentation/vm/slabinfo.c +++ b/Documentation/vm/slabinfo.c | |||
@@ -1123,7 +1123,7 @@ void read_slab_dir(void) | |||
1123 | char *t; | 1123 | char *t; |
1124 | int count; | 1124 | int count; |
1125 | 1125 | ||
1126 | if (chdir("/sys/kernel/slab")) | 1126 | if (chdir("/sys/kernel/slab") && chdir("/sys/slab")) |
1127 | fatal("SYSFS support for SLUB not active\n"); | 1127 | fatal("SYSFS support for SLUB not active\n"); |
1128 | 1128 | ||
1129 | dir = opendir("."); | 1129 | dir = opendir("."); |
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 055989e94799..2d207ad30336 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -658,9 +658,10 @@ int bus_add_driver(struct device_driver *drv) | |||
658 | pr_debug("bus: '%s': add driver %s\n", bus->name, drv->name); | 658 | pr_debug("bus: '%s': add driver %s\n", bus->name, drv->name); |
659 | 659 | ||
660 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 660 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
661 | if (!priv) | 661 | if (!priv) { |
662 | return -ENOMEM; | 662 | error = -ENOMEM; |
663 | 663 | goto out_put_bus; | |
664 | } | ||
664 | klist_init(&priv->klist_devices, NULL, NULL); | 665 | klist_init(&priv->klist_devices, NULL, NULL); |
665 | priv->driver = drv; | 666 | priv->driver = drv; |
666 | drv->p = priv; | 667 | drv->p = priv; |
@@ -668,7 +669,7 @@ int bus_add_driver(struct device_driver *drv) | |||
668 | error = kobject_init_and_add(&priv->kobj, &driver_ktype, NULL, | 669 | error = kobject_init_and_add(&priv->kobj, &driver_ktype, NULL, |
669 | "%s", drv->name); | 670 | "%s", drv->name); |
670 | if (error) | 671 | if (error) |
671 | goto out_put_bus; | 672 | goto out_unregister; |
672 | 673 | ||
673 | if (drv->bus->p->drivers_autoprobe) { | 674 | if (drv->bus->p->drivers_autoprobe) { |
674 | error = driver_attach(drv); | 675 | error = driver_attach(drv); |
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index ba75184c653c..bf31a0170a48 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c | |||
@@ -120,6 +120,9 @@ EXPORT_SYMBOL_GPL(driver_remove_file); | |||
120 | 120 | ||
121 | /** | 121 | /** |
122 | * driver_add_kobj - add a kobject below the specified driver | 122 | * driver_add_kobj - add a kobject below the specified driver |
123 | * @drv: requesting device driver | ||
124 | * @kobj: kobject to add below this driver | ||
125 | * @fmt: format string that names the kobject | ||
123 | * | 126 | * |
124 | * You really don't want to do this, this is only here due to one looney | 127 | * You really don't want to do this, this is only here due to one looney |
125 | * iseries driver, go poke those developers if you are annoyed about | 128 | * iseries driver, go poke those developers if you are annoyed about |
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index bdc03f7e8424..cea5ed3919cd 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -479,7 +479,6 @@ static int dpm_suspend(pm_message_t state) | |||
479 | mutex_lock(&dpm_list_mtx); | 479 | mutex_lock(&dpm_list_mtx); |
480 | if (list_empty(&dev->power.entry)) | 480 | if (list_empty(&dev->power.entry)) |
481 | list_add(&dev->power.entry, &dpm_locked); | 481 | list_add(&dev->power.entry, &dpm_locked); |
482 | mutex_unlock(&dpm_list_mtx); | ||
483 | break; | 482 | break; |
484 | } | 483 | } |
485 | mutex_lock(&dpm_list_mtx); | 484 | mutex_lock(&dpm_list_mtx); |
@@ -523,6 +522,7 @@ static void lock_all_devices(void) | |||
523 | 522 | ||
524 | /** | 523 | /** |
525 | * device_suspend - Save state and stop all devices in system. | 524 | * device_suspend - Save state and stop all devices in system. |
525 | * @state: new power management state | ||
526 | * | 526 | * |
527 | * Prevent new devices from being registered, then lock all devices | 527 | * Prevent new devices from being registered, then lock all devices |
528 | * and suspend them. | 528 | * and suspend them. |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 64926aa990db..89a29cd93783 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -1006,14 +1006,6 @@ static int __cpufreq_remove_dev (struct sys_device * sys_dev) | |||
1006 | } | 1006 | } |
1007 | #endif | 1007 | #endif |
1008 | 1008 | ||
1009 | |||
1010 | if (!kobject_get(&data->kobj)) { | ||
1011 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); | ||
1012 | cpufreq_debug_enable_ratelimit(); | ||
1013 | unlock_policy_rwsem_write(cpu); | ||
1014 | return -EFAULT; | ||
1015 | } | ||
1016 | |||
1017 | #ifdef CONFIG_SMP | 1009 | #ifdef CONFIG_SMP |
1018 | 1010 | ||
1019 | #ifdef CONFIG_HOTPLUG_CPU | 1011 | #ifdef CONFIG_HOTPLUG_CPU |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 4a8952a6c3da..477833f0daf5 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -1229,7 +1229,7 @@ static int __init ide_setup(char *s) | |||
1229 | if (!strcmp(s, "ide=reverse")) { | 1229 | if (!strcmp(s, "ide=reverse")) { |
1230 | ide_scan_direction = 1; | 1230 | ide_scan_direction = 1; |
1231 | printk(" : Enabled support for IDE inverse scan order.\n"); | 1231 | printk(" : Enabled support for IDE inverse scan order.\n"); |
1232 | return 1; | 1232 | goto obsolete_option; |
1233 | } | 1233 | } |
1234 | #endif | 1234 | #endif |
1235 | 1235 | ||
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 2a77e9d42c68..e8a01f264540 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c | |||
@@ -57,29 +57,29 @@ struct uio_map { | |||
57 | }; | 57 | }; |
58 | #define to_map(map) container_of(map, struct uio_map, kobj) | 58 | #define to_map(map) container_of(map, struct uio_map, kobj) |
59 | 59 | ||
60 | 60 | static ssize_t map_addr_show(struct uio_mem *mem, char *buf) | |
61 | static ssize_t map_attr_show(struct kobject *kobj, struct kobj_attribute *attr, | ||
62 | char *buf) | ||
63 | { | 61 | { |
64 | struct uio_map *map = to_map(kobj); | 62 | return sprintf(buf, "0x%lx\n", mem->addr); |
65 | struct uio_mem *mem = map->mem; | 63 | } |
66 | |||
67 | if (strncmp(attr->attr.name, "addr", 4) == 0) | ||
68 | return sprintf(buf, "0x%lx\n", mem->addr); | ||
69 | |||
70 | if (strncmp(attr->attr.name, "size", 4) == 0) | ||
71 | return sprintf(buf, "0x%lx\n", mem->size); | ||
72 | 64 | ||
73 | return -ENODEV; | 65 | static ssize_t map_size_show(struct uio_mem *mem, char *buf) |
66 | { | ||
67 | return sprintf(buf, "0x%lx\n", mem->size); | ||
74 | } | 68 | } |
75 | 69 | ||
76 | static struct kobj_attribute attr_attribute = | 70 | struct uio_sysfs_entry { |
77 | __ATTR(addr, S_IRUGO, map_attr_show, NULL); | 71 | struct attribute attr; |
78 | static struct kobj_attribute size_attribute = | 72 | ssize_t (*show)(struct uio_mem *, char *); |
79 | __ATTR(size, S_IRUGO, map_attr_show, NULL); | 73 | ssize_t (*store)(struct uio_mem *, const char *, size_t); |
74 | }; | ||
75 | |||
76 | static struct uio_sysfs_entry addr_attribute = | ||
77 | __ATTR(addr, S_IRUGO, map_addr_show, NULL); | ||
78 | static struct uio_sysfs_entry size_attribute = | ||
79 | __ATTR(size, S_IRUGO, map_size_show, NULL); | ||
80 | 80 | ||
81 | static struct attribute *attrs[] = { | 81 | static struct attribute *attrs[] = { |
82 | &attr_attribute.attr, | 82 | &addr_attribute.attr, |
83 | &size_attribute.attr, | 83 | &size_attribute.attr, |
84 | NULL, /* need to NULL terminate the list of attributes */ | 84 | NULL, /* need to NULL terminate the list of attributes */ |
85 | }; | 85 | }; |
@@ -90,8 +90,28 @@ static void map_release(struct kobject *kobj) | |||
90 | kfree(map); | 90 | kfree(map); |
91 | } | 91 | } |
92 | 92 | ||
93 | static ssize_t map_type_show(struct kobject *kobj, struct attribute *attr, | ||
94 | char *buf) | ||
95 | { | ||
96 | struct uio_map *map = to_map(kobj); | ||
97 | struct uio_mem *mem = map->mem; | ||
98 | struct uio_sysfs_entry *entry; | ||
99 | |||
100 | entry = container_of(attr, struct uio_sysfs_entry, attr); | ||
101 | |||
102 | if (!entry->show) | ||
103 | return -EIO; | ||
104 | |||
105 | return entry->show(mem, buf); | ||
106 | } | ||
107 | |||
108 | static struct sysfs_ops uio_sysfs_ops = { | ||
109 | .show = map_type_show, | ||
110 | }; | ||
111 | |||
93 | static struct kobj_type map_attr_type = { | 112 | static struct kobj_type map_attr_type = { |
94 | .release = map_release, | 113 | .release = map_release, |
114 | .sysfs_ops = &uio_sysfs_ops, | ||
95 | .default_attrs = attrs, | 115 | .default_attrs = attrs, |
96 | }; | 116 | }; |
97 | 117 | ||
diff --git a/kernel/module.c b/kernel/module.c index 92595bad3812..901cd6ac2f11 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -987,12 +987,11 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs, | |||
987 | return ret; | 987 | return ret; |
988 | } | 988 | } |
989 | 989 | ||
990 | |||
991 | /* | 990 | /* |
992 | * /sys/module/foo/sections stuff | 991 | * /sys/module/foo/sections stuff |
993 | * J. Corbet <corbet@lwn.net> | 992 | * J. Corbet <corbet@lwn.net> |
994 | */ | 993 | */ |
995 | #ifdef CONFIG_KALLSYMS | 994 | #if defined(CONFIG_KALLSYMS) && defined(CONFIG_SYSFS) |
996 | static ssize_t module_sect_show(struct module_attribute *mattr, | 995 | static ssize_t module_sect_show(struct module_attribute *mattr, |
997 | struct module *mod, char *buf) | 996 | struct module *mod, char *buf) |
998 | { | 997 | { |
@@ -1188,7 +1187,7 @@ static inline void add_notes_attrs(struct module *mod, unsigned int nsect, | |||
1188 | static inline void remove_notes_attrs(struct module *mod) | 1187 | static inline void remove_notes_attrs(struct module *mod) |
1189 | { | 1188 | { |
1190 | } | 1189 | } |
1191 | #endif /* CONFIG_KALLSYMS */ | 1190 | #endif |
1192 | 1191 | ||
1193 | #ifdef CONFIG_SYSFS | 1192 | #ifdef CONFIG_SYSFS |
1194 | int module_add_modinfo_attrs(struct module *mod) | 1193 | int module_add_modinfo_attrs(struct module *mod) |
@@ -1231,9 +1230,7 @@ void module_remove_modinfo_attrs(struct module *mod) | |||
1231 | } | 1230 | } |
1232 | kfree(mod->modinfo_attrs); | 1231 | kfree(mod->modinfo_attrs); |
1233 | } | 1232 | } |
1234 | #endif | ||
1235 | 1233 | ||
1236 | #ifdef CONFIG_SYSFS | ||
1237 | int mod_sysfs_init(struct module *mod) | 1234 | int mod_sysfs_init(struct module *mod) |
1238 | { | 1235 | { |
1239 | int err; | 1236 | int err; |