diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 14:42:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 14:42:52 -0500 |
commit | ff4b8a57f0aaa2882d444ca44b2b9b333d22a4df (patch) | |
tree | d851c923f85566572112d4c0f884cff388a3cc05 /kernel | |
parent | 805a6af8dba5dfdd35ec35dc52ec0122400b2610 (diff) | |
parent | ea04018e6bc5ddb2f0466c0e5b986bd4901b7e8e (diff) |
Merge branch 'driver-core-next' into Linux 3.2
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
and it fixes the build error in the arch/x86/kernel/microcode_core.c
file, that the merge did not catch.
The microcode_core.c patch was provided by Stephen Rothwell
<sfr@canb.auug.org.au> who was invaluable in the merge issues involved
with the large sysdev removal process in the driver-core tree.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rtmutex-tester.c | 37 | ||||
-rw-r--r-- | kernel/sched.c | 40 | ||||
-rw-r--r-- | kernel/time/clockevents.c | 1 | ||||
-rw-r--r-- | kernel/time/clocksource.c | 37 |
4 files changed, 57 insertions, 58 deletions
diff --git a/kernel/rtmutex-tester.c b/kernel/rtmutex-tester.c index 3d9f31cd79e7..98ec49475460 100644 --- a/kernel/rtmutex-tester.c +++ b/kernel/rtmutex-tester.c | |||
@@ -6,11 +6,11 @@ | |||
6 | * Copyright (C) 2006, Timesys Corp., Thomas Gleixner <tglx@timesys.com> | 6 | * Copyright (C) 2006, Timesys Corp., Thomas Gleixner <tglx@timesys.com> |
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | #include <linux/device.h> | ||
9 | #include <linux/kthread.h> | 10 | #include <linux/kthread.h> |
10 | #include <linux/export.h> | 11 | #include <linux/export.h> |
11 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
12 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
13 | #include <linux/sysdev.h> | ||
14 | #include <linux/timer.h> | 14 | #include <linux/timer.h> |
15 | #include <linux/freezer.h> | 15 | #include <linux/freezer.h> |
16 | 16 | ||
@@ -27,7 +27,7 @@ struct test_thread_data { | |||
27 | int opdata; | 27 | int opdata; |
28 | int mutexes[MAX_RT_TEST_MUTEXES]; | 28 | int mutexes[MAX_RT_TEST_MUTEXES]; |
29 | int event; | 29 | int event; |
30 | struct sys_device sysdev; | 30 | struct device dev; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | static struct test_thread_data thread_data[MAX_RT_TEST_THREADS]; | 33 | static struct test_thread_data thread_data[MAX_RT_TEST_THREADS]; |
@@ -271,7 +271,7 @@ static int test_func(void *data) | |||
271 | * | 271 | * |
272 | * opcode:data | 272 | * opcode:data |
273 | */ | 273 | */ |
274 | static ssize_t sysfs_test_command(struct sys_device *dev, struct sysdev_attribute *attr, | 274 | static ssize_t sysfs_test_command(struct device *dev, struct device_attribute *attr, |
275 | const char *buf, size_t count) | 275 | const char *buf, size_t count) |
276 | { | 276 | { |
277 | struct sched_param schedpar; | 277 | struct sched_param schedpar; |
@@ -279,8 +279,8 @@ static ssize_t sysfs_test_command(struct sys_device *dev, struct sysdev_attribut | |||
279 | char cmdbuf[32]; | 279 | char cmdbuf[32]; |
280 | int op, dat, tid, ret; | 280 | int op, dat, tid, ret; |
281 | 281 | ||
282 | td = container_of(dev, struct test_thread_data, sysdev); | 282 | td = container_of(dev, struct test_thread_data, dev); |
283 | tid = td->sysdev.id; | 283 | tid = td->dev.id; |
284 | 284 | ||
285 | /* strings from sysfs write are not 0 terminated! */ | 285 | /* strings from sysfs write are not 0 terminated! */ |
286 | if (count >= sizeof(cmdbuf)) | 286 | if (count >= sizeof(cmdbuf)) |
@@ -334,7 +334,7 @@ static ssize_t sysfs_test_command(struct sys_device *dev, struct sysdev_attribut | |||
334 | * @dev: thread to query | 334 | * @dev: thread to query |
335 | * @buf: char buffer to be filled with thread status info | 335 | * @buf: char buffer to be filled with thread status info |
336 | */ | 336 | */ |
337 | static ssize_t sysfs_test_status(struct sys_device *dev, struct sysdev_attribute *attr, | 337 | static ssize_t sysfs_test_status(struct device *dev, struct device_attribute *attr, |
338 | char *buf) | 338 | char *buf) |
339 | { | 339 | { |
340 | struct test_thread_data *td; | 340 | struct test_thread_data *td; |
@@ -342,8 +342,8 @@ static ssize_t sysfs_test_status(struct sys_device *dev, struct sysdev_attribute | |||
342 | char *curr = buf; | 342 | char *curr = buf; |
343 | int i; | 343 | int i; |
344 | 344 | ||
345 | td = container_of(dev, struct test_thread_data, sysdev); | 345 | td = container_of(dev, struct test_thread_data, dev); |
346 | tsk = threads[td->sysdev.id]; | 346 | tsk = threads[td->dev.id]; |
347 | 347 | ||
348 | spin_lock(&rttest_lock); | 348 | spin_lock(&rttest_lock); |
349 | 349 | ||
@@ -360,28 +360,29 @@ static ssize_t sysfs_test_status(struct sys_device *dev, struct sysdev_attribute | |||
360 | spin_unlock(&rttest_lock); | 360 | spin_unlock(&rttest_lock); |
361 | 361 | ||
362 | curr += sprintf(curr, ", T: %p, R: %p\n", tsk, | 362 | curr += sprintf(curr, ", T: %p, R: %p\n", tsk, |
363 | mutexes[td->sysdev.id].owner); | 363 | mutexes[td->dev.id].owner); |
364 | 364 | ||
365 | return curr - buf; | 365 | return curr - buf; |
366 | } | 366 | } |
367 | 367 | ||
368 | static SYSDEV_ATTR(status, 0600, sysfs_test_status, NULL); | 368 | static DEVICE_ATTR(status, 0600, sysfs_test_status, NULL); |
369 | static SYSDEV_ATTR(command, 0600, NULL, sysfs_test_command); | 369 | static DEVICE_ATTR(command, 0600, NULL, sysfs_test_command); |
370 | 370 | ||
371 | static struct sysdev_class rttest_sysclass = { | 371 | static struct bus_type rttest_subsys = { |
372 | .name = "rttest", | 372 | .name = "rttest", |
373 | .dev_name = "rttest", | ||
373 | }; | 374 | }; |
374 | 375 | ||
375 | static int init_test_thread(int id) | 376 | static int init_test_thread(int id) |
376 | { | 377 | { |
377 | thread_data[id].sysdev.cls = &rttest_sysclass; | 378 | thread_data[id].dev.bus = &rttest_subsys; |
378 | thread_data[id].sysdev.id = id; | 379 | thread_data[id].dev.id = id; |
379 | 380 | ||
380 | threads[id] = kthread_run(test_func, &thread_data[id], "rt-test-%d", id); | 381 | threads[id] = kthread_run(test_func, &thread_data[id], "rt-test-%d", id); |
381 | if (IS_ERR(threads[id])) | 382 | if (IS_ERR(threads[id])) |
382 | return PTR_ERR(threads[id]); | 383 | return PTR_ERR(threads[id]); |
383 | 384 | ||
384 | return sysdev_register(&thread_data[id].sysdev); | 385 | return device_register(&thread_data[id].dev); |
385 | } | 386 | } |
386 | 387 | ||
387 | static int init_rttest(void) | 388 | static int init_rttest(void) |
@@ -393,7 +394,7 @@ static int init_rttest(void) | |||
393 | for (i = 0; i < MAX_RT_TEST_MUTEXES; i++) | 394 | for (i = 0; i < MAX_RT_TEST_MUTEXES; i++) |
394 | rt_mutex_init(&mutexes[i]); | 395 | rt_mutex_init(&mutexes[i]); |
395 | 396 | ||
396 | ret = sysdev_class_register(&rttest_sysclass); | 397 | ret = subsys_system_register(&rttest_subsys, NULL); |
397 | if (ret) | 398 | if (ret) |
398 | return ret; | 399 | return ret; |
399 | 400 | ||
@@ -401,10 +402,10 @@ static int init_rttest(void) | |||
401 | ret = init_test_thread(i); | 402 | ret = init_test_thread(i); |
402 | if (ret) | 403 | if (ret) |
403 | break; | 404 | break; |
404 | ret = sysdev_create_file(&thread_data[i].sysdev, &attr_status); | 405 | ret = device_create_file(&thread_data[i].dev, &dev_attr_status); |
405 | if (ret) | 406 | if (ret) |
406 | break; | 407 | break; |
407 | ret = sysdev_create_file(&thread_data[i].sysdev, &attr_command); | 408 | ret = device_create_file(&thread_data[i].dev, &dev_attr_command); |
408 | if (ret) | 409 | if (ret) |
409 | break; | 410 | break; |
410 | } | 411 | } |
diff --git a/kernel/sched.c b/kernel/sched.c index d6b149ccf925..a7f381a78469 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -7940,54 +7940,52 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt) | |||
7940 | } | 7940 | } |
7941 | 7941 | ||
7942 | #ifdef CONFIG_SCHED_MC | 7942 | #ifdef CONFIG_SCHED_MC |
7943 | static ssize_t sched_mc_power_savings_show(struct sysdev_class *class, | 7943 | static ssize_t sched_mc_power_savings_show(struct device *dev, |
7944 | struct sysdev_class_attribute *attr, | 7944 | struct device_attribute *attr, |
7945 | char *page) | 7945 | char *buf) |
7946 | { | 7946 | { |
7947 | return sprintf(page, "%u\n", sched_mc_power_savings); | 7947 | return sprintf(buf, "%u\n", sched_mc_power_savings); |
7948 | } | 7948 | } |
7949 | static ssize_t sched_mc_power_savings_store(struct sysdev_class *class, | 7949 | static ssize_t sched_mc_power_savings_store(struct device *dev, |
7950 | struct sysdev_class_attribute *attr, | 7950 | struct device_attribute *attr, |
7951 | const char *buf, size_t count) | 7951 | const char *buf, size_t count) |
7952 | { | 7952 | { |
7953 | return sched_power_savings_store(buf, count, 0); | 7953 | return sched_power_savings_store(buf, count, 0); |
7954 | } | 7954 | } |
7955 | static SYSDEV_CLASS_ATTR(sched_mc_power_savings, 0644, | 7955 | static DEVICE_ATTR(sched_mc_power_savings, 0644, |
7956 | sched_mc_power_savings_show, | 7956 | sched_mc_power_savings_show, |
7957 | sched_mc_power_savings_store); | 7957 | sched_mc_power_savings_store); |
7958 | #endif | 7958 | #endif |
7959 | 7959 | ||
7960 | #ifdef CONFIG_SCHED_SMT | 7960 | #ifdef CONFIG_SCHED_SMT |
7961 | static ssize_t sched_smt_power_savings_show(struct sysdev_class *dev, | 7961 | static ssize_t sched_smt_power_savings_show(struct device *dev, |
7962 | struct sysdev_class_attribute *attr, | 7962 | struct device_attribute *attr, |
7963 | char *page) | 7963 | char *buf) |
7964 | { | 7964 | { |
7965 | return sprintf(page, "%u\n", sched_smt_power_savings); | 7965 | return sprintf(buf, "%u\n", sched_smt_power_savings); |
7966 | } | 7966 | } |
7967 | static ssize_t sched_smt_power_savings_store(struct sysdev_class *dev, | 7967 | static ssize_t sched_smt_power_savings_store(struct device *dev, |
7968 | struct sysdev_class_attribute *attr, | 7968 | struct device_attribute *attr, |
7969 | const char *buf, size_t count) | 7969 | const char *buf, size_t count) |
7970 | { | 7970 | { |
7971 | return sched_power_savings_store(buf, count, 1); | 7971 | return sched_power_savings_store(buf, count, 1); |
7972 | } | 7972 | } |
7973 | static SYSDEV_CLASS_ATTR(sched_smt_power_savings, 0644, | 7973 | static DEVICE_ATTR(sched_smt_power_savings, 0644, |
7974 | sched_smt_power_savings_show, | 7974 | sched_smt_power_savings_show, |
7975 | sched_smt_power_savings_store); | 7975 | sched_smt_power_savings_store); |
7976 | #endif | 7976 | #endif |
7977 | 7977 | ||
7978 | int __init sched_create_sysfs_power_savings_entries(struct sysdev_class *cls) | 7978 | int __init sched_create_sysfs_power_savings_entries(struct device *dev) |
7979 | { | 7979 | { |
7980 | int err = 0; | 7980 | int err = 0; |
7981 | 7981 | ||
7982 | #ifdef CONFIG_SCHED_SMT | 7982 | #ifdef CONFIG_SCHED_SMT |
7983 | if (smt_capable()) | 7983 | if (smt_capable()) |
7984 | err = sysfs_create_file(&cls->kset.kobj, | 7984 | err = device_create_file(dev, &dev_attr_sched_smt_power_savings); |
7985 | &attr_sched_smt_power_savings.attr); | ||
7986 | #endif | 7985 | #endif |
7987 | #ifdef CONFIG_SCHED_MC | 7986 | #ifdef CONFIG_SCHED_MC |
7988 | if (!err && mc_capable()) | 7987 | if (!err && mc_capable()) |
7989 | err = sysfs_create_file(&cls->kset.kobj, | 7988 | err = device_create_file(dev, &dev_attr_sched_mc_power_savings); |
7990 | &attr_sched_mc_power_savings.attr); | ||
7991 | #endif | 7989 | #endif |
7992 | return err; | 7990 | return err; |
7993 | } | 7991 | } |
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 1ecd6ba36d6c..9cd928f7a7c6 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/notifier.h> | 18 | #include <linux/notifier.h> |
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
20 | #include <linux/sysdev.h> | ||
21 | 20 | ||
22 | #include "tick-internal.h" | 21 | #include "tick-internal.h" |
23 | 22 | ||
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index d3ad022136e5..a45ca167ab24 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
@@ -23,8 +23,8 @@ | |||
23 | * o Allow clocksource drivers to be unregistered | 23 | * o Allow clocksource drivers to be unregistered |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/device.h> | ||
26 | #include <linux/clocksource.h> | 27 | #include <linux/clocksource.h> |
27 | #include <linux/sysdev.h> | ||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */ | 30 | #include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */ |
@@ -796,8 +796,8 @@ EXPORT_SYMBOL(clocksource_unregister); | |||
796 | * Provides sysfs interface for listing current clocksource. | 796 | * Provides sysfs interface for listing current clocksource. |
797 | */ | 797 | */ |
798 | static ssize_t | 798 | static ssize_t |
799 | sysfs_show_current_clocksources(struct sys_device *dev, | 799 | sysfs_show_current_clocksources(struct device *dev, |
800 | struct sysdev_attribute *attr, char *buf) | 800 | struct device_attribute *attr, char *buf) |
801 | { | 801 | { |
802 | ssize_t count = 0; | 802 | ssize_t count = 0; |
803 | 803 | ||
@@ -818,8 +818,8 @@ sysfs_show_current_clocksources(struct sys_device *dev, | |||
818 | * Takes input from sysfs interface for manually overriding the default | 818 | * Takes input from sysfs interface for manually overriding the default |
819 | * clocksource selection. | 819 | * clocksource selection. |
820 | */ | 820 | */ |
821 | static ssize_t sysfs_override_clocksource(struct sys_device *dev, | 821 | static ssize_t sysfs_override_clocksource(struct device *dev, |
822 | struct sysdev_attribute *attr, | 822 | struct device_attribute *attr, |
823 | const char *buf, size_t count) | 823 | const char *buf, size_t count) |
824 | { | 824 | { |
825 | size_t ret = count; | 825 | size_t ret = count; |
@@ -853,8 +853,8 @@ static ssize_t sysfs_override_clocksource(struct sys_device *dev, | |||
853 | * Provides sysfs interface for listing registered clocksources | 853 | * Provides sysfs interface for listing registered clocksources |
854 | */ | 854 | */ |
855 | static ssize_t | 855 | static ssize_t |
856 | sysfs_show_available_clocksources(struct sys_device *dev, | 856 | sysfs_show_available_clocksources(struct device *dev, |
857 | struct sysdev_attribute *attr, | 857 | struct device_attribute *attr, |
858 | char *buf) | 858 | char *buf) |
859 | { | 859 | { |
860 | struct clocksource *src; | 860 | struct clocksource *src; |
@@ -883,35 +883,36 @@ sysfs_show_available_clocksources(struct sys_device *dev, | |||
883 | /* | 883 | /* |
884 | * Sysfs setup bits: | 884 | * Sysfs setup bits: |
885 | */ | 885 | */ |
886 | static SYSDEV_ATTR(current_clocksource, 0644, sysfs_show_current_clocksources, | 886 | static DEVICE_ATTR(current_clocksource, 0644, sysfs_show_current_clocksources, |
887 | sysfs_override_clocksource); | 887 | sysfs_override_clocksource); |
888 | 888 | ||
889 | static SYSDEV_ATTR(available_clocksource, 0444, | 889 | static DEVICE_ATTR(available_clocksource, 0444, |
890 | sysfs_show_available_clocksources, NULL); | 890 | sysfs_show_available_clocksources, NULL); |
891 | 891 | ||
892 | static struct sysdev_class clocksource_sysclass = { | 892 | static struct bus_type clocksource_subsys = { |
893 | .name = "clocksource", | 893 | .name = "clocksource", |
894 | .dev_name = "clocksource", | ||
894 | }; | 895 | }; |
895 | 896 | ||
896 | static struct sys_device device_clocksource = { | 897 | static struct device device_clocksource = { |
897 | .id = 0, | 898 | .id = 0, |
898 | .cls = &clocksource_sysclass, | 899 | .bus = &clocksource_subsys, |
899 | }; | 900 | }; |
900 | 901 | ||
901 | static int __init init_clocksource_sysfs(void) | 902 | static int __init init_clocksource_sysfs(void) |
902 | { | 903 | { |
903 | int error = sysdev_class_register(&clocksource_sysclass); | 904 | int error = subsys_system_register(&clocksource_subsys, NULL); |
904 | 905 | ||
905 | if (!error) | 906 | if (!error) |
906 | error = sysdev_register(&device_clocksource); | 907 | error = device_register(&device_clocksource); |
907 | if (!error) | 908 | if (!error) |
908 | error = sysdev_create_file( | 909 | error = device_create_file( |
909 | &device_clocksource, | 910 | &device_clocksource, |
910 | &attr_current_clocksource); | 911 | &dev_attr_current_clocksource); |
911 | if (!error) | 912 | if (!error) |
912 | error = sysdev_create_file( | 913 | error = device_create_file( |
913 | &device_clocksource, | 914 | &device_clocksource, |
914 | &attr_available_clocksource); | 915 | &dev_attr_available_clocksource); |
915 | return error; | 916 | return error; |
916 | } | 917 | } |
917 | 918 | ||