]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/power/power.h
Hibernation: Introduce SNAPSHOT_GET_IMAGE_SIZE ioctl
[karo-tx-linux.git] / kernel / power / power.h
index 195dc4611764b08a65780976a6231aaf004889fe..23c17031ed2183cc519911afa53b1325d47cb328 100644 (file)
@@ -54,7 +54,7 @@ extern int pfn_is_nosave(unsigned long);
 extern struct mutex pm_mutex;
 
 #define power_attr(_name) \
-static struct subsys_attribute _name##_attr = {        \
+static struct kobj_attribute _name##_attr = {  \
        .attr   = {                             \
                .name = __stringify(_name),     \
                .mode = 0644,                   \
@@ -63,8 +63,6 @@ static struct subsys_attribute _name##_attr = {       \
        .store  = _name##_store,                \
 }
 
-extern struct kset power_subsys;
-
 /* Preferred image size in bytes (default 500 MB) */
 extern unsigned long image_size;
 extern int in_suspend;
@@ -130,6 +128,7 @@ struct snapshot_handle {
 #define data_of(handle)        ((handle).buffer + (handle).buf_offset)
 
 extern unsigned int snapshot_additional_pages(struct zone *zone);
+extern unsigned long snapshot_get_image_size(void);
 extern int snapshot_read_next(struct snapshot_handle *handle, size_t count);
 extern int snapshot_write_next(struct snapshot_handle *handle, size_t count);
 extern void snapshot_write_finalize(struct snapshot_handle *handle);
@@ -160,7 +159,8 @@ struct resume_swap_area {
 #define SNAPSHOT_PMOPS                 _IOW(SNAPSHOT_IOC_MAGIC, 12, unsigned int)
 #define SNAPSHOT_SET_SWAP_AREA         _IOW(SNAPSHOT_IOC_MAGIC, 13, \
                                                        struct resume_swap_area)
-#define SNAPSHOT_IOC_MAXNR     13
+#define SNAPSHOT_GET_IMAGE_SIZE                _IOR(SNAPSHOT_IOC_MAGIC, 14, loff_t)
+#define SNAPSHOT_IOC_MAXNR     14
 
 #define PMOPS_PREPARE  1
 #define PMOPS_ENTER    2