+static ssize_t
+wl1251_show_long_doze(struct device *dev, struct device_attribute *attr,
+ char *buf)
+{
+ struct wl1251 *wl = dev_get_drvdata(dev);
+ return sprintf(buf, "%d\n", wl->long_doze_mode);
+}
+
+static ssize_t
+wl1251_set_long_doze(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ struct wl1251 *wl = dev_get_drvdata(dev);
+ int val, ret;
+
+ ret = kstrtoint(buf, 10, &val);
+ if (ret < 0)
+ return ret;
+
+ wl->long_doze_mode = !!val;
+ return count;
+}
+static DEVICE_ATTR(long_doze_mode, S_IRUGO | S_IWUSR,
+ wl1251_show_long_doze, wl1251_set_long_doze);
+