qlge: bugfix: Pad outbound frames smaller than 60 bytes.
[safe/jmp/linux-2.6] / drivers / cpuidle / sysfs.c
index 69102ca..97b0038 100644 (file)
@@ -21,7 +21,8 @@ static int __init cpuidle_sysfs_setup(char *unused)
 }
 __setup("cpuidle_sysfs_switch", cpuidle_sysfs_setup);
 
-static ssize_t show_available_governors(struct sys_device *dev, char *buf)
+static ssize_t show_available_governors(struct sysdev_class *class,
+                                       char *buf)
 {
        ssize_t i = 0;
        struct cpuidle_governor *tmp;
@@ -39,7 +40,8 @@ out:
        return i;
 }
 
-static ssize_t show_current_driver(struct sys_device *dev, char *buf)
+static ssize_t show_current_driver(struct sysdev_class *class,
+                                  char *buf)
 {
        ssize_t ret;
 
@@ -53,7 +55,8 @@ static ssize_t show_current_driver(struct sys_device *dev, char *buf)
        return ret;
 }
 
-static ssize_t show_current_governor(struct sys_device *dev, char *buf)
+static ssize_t show_current_governor(struct sysdev_class *class,
+                                    char *buf)
 {
        ssize_t ret;
 
@@ -67,8 +70,8 @@ static ssize_t show_current_governor(struct sys_device *dev, char *buf)
        return ret;
 }
 
-static ssize_t store_current_governor(struct sys_device *dev,
-       const char *buf, size_t count)
+static ssize_t store_current_governor(struct sysdev_class *class,
+                                     const char *buf, size_t count)
 {
        char gov_name[CPUIDLE_NAME_LEN];
        int ret = -EINVAL;
@@ -100,8 +103,9 @@ static ssize_t store_current_governor(struct sys_device *dev,
                return count;
 }
 
-static SYSDEV_ATTR(current_driver, 0444, show_current_driver, NULL);
-static SYSDEV_ATTR(current_governor_ro, 0444, show_current_governor, NULL);
+static SYSDEV_CLASS_ATTR(current_driver, 0444, show_current_driver, NULL);
+static SYSDEV_CLASS_ATTR(current_governor_ro, 0444, show_current_governor,
+                        NULL);
 
 static struct attribute *cpuclass_default_attrs[] = {
        &attr_current_driver.attr,
@@ -109,9 +113,10 @@ static struct attribute *cpuclass_default_attrs[] = {
        NULL
 };
 
-static SYSDEV_ATTR(available_governors, 0444, show_available_governors, NULL);
-static SYSDEV_ATTR(current_governor, 0644, show_current_governor,
-       store_current_governor);
+static SYSDEV_CLASS_ATTR(available_governors, 0444, show_available_governors,
+                        NULL);
+static SYSDEV_CLASS_ATTR(current_governor, 0644, show_current_governor,
+                        store_current_governor);
 
 static struct attribute *cpuclass_switch_attrs[] = {
        &attr_available_governors.attr,
@@ -218,6 +223,12 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
        return sprintf(buf, "%u\n", state->_name);\
 }
 
+#define define_show_state_ull_function(_name) \
+static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
+{ \
+       return sprintf(buf, "%llu\n", state->_name);\
+}
+
 #define define_show_state_str_function(_name) \
 static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
 { \
@@ -228,8 +239,8 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \
 
 define_show_state_function(exit_latency)
 define_show_state_function(power_usage)
-define_show_state_function(usage)
-define_show_state_function(time)
+define_show_state_ull_function(usage)
+define_show_state_ull_function(time)
 define_show_state_str_function(name)
 define_show_state_str_function(desc)