diff options
Diffstat (limited to 'kernel/time/clocksource.c')
-rw-r--r-- | kernel/time/clocksource.c | 37 |
1 files changed, 19 insertions, 18 deletions
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 | ||