aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/clocksource.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2012-01-06 14:42:52 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-06 14:42:52 -0500
commitff4b8a57f0aaa2882d444ca44b2b9b333d22a4df (patch)
treed851c923f85566572112d4c0f884cff388a3cc05 /kernel/time/clocksource.c
parent805a6af8dba5dfdd35ec35dc52ec0122400b2610 (diff)
parentea04018e6bc5ddb2f0466c0e5b986bd4901b7e8e (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/time/clocksource.c')
-rw-r--r--kernel/time/clocksource.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index d3ad022136e..a45ca167ab2 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 */
798static ssize_t 798static ssize_t
799sysfs_show_current_clocksources(struct sys_device *dev, 799sysfs_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 */
821static ssize_t sysfs_override_clocksource(struct sys_device *dev, 821static 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 */
855static ssize_t 855static ssize_t
856sysfs_show_available_clocksources(struct sys_device *dev, 856sysfs_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 */
886static SYSDEV_ATTR(current_clocksource, 0644, sysfs_show_current_clocksources, 886static DEVICE_ATTR(current_clocksource, 0644, sysfs_show_current_clocksources,
887 sysfs_override_clocksource); 887 sysfs_override_clocksource);
888 888
889static SYSDEV_ATTR(available_clocksource, 0444, 889static DEVICE_ATTR(available_clocksource, 0444,
890 sysfs_show_available_clocksources, NULL); 890 sysfs_show_available_clocksources, NULL);
891 891
892static struct sysdev_class clocksource_sysclass = { 892static struct bus_type clocksource_subsys = {
893 .name = "clocksource", 893 .name = "clocksource",
894 .dev_name = "clocksource",
894}; 895};
895 896
896static struct sys_device device_clocksource = { 897static struct device device_clocksource = {
897 .id = 0, 898 .id = 0,
898 .cls = &clocksource_sysclass, 899 .bus = &clocksource_subsys,
899}; 900};
900 901
901static int __init init_clocksource_sysfs(void) 902static 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