[PATCH 6/8] zram: allow automatic new zram device_id assignment

2015-02-26 Thread Sergey Senozhatsky
If no particular device_id was requested (passed -1 to zram_add()) during new zram device creation, generate one automatically and return it back. So, schematically, device creation can be done as: dev_id = ioctl ZRAM_CTL_ADD -1 # dev_id == 1 or error code init device

[PATCH 6/8] zram: allow automatic new zram device_id assignment

2015-02-26 Thread Sergey Senozhatsky
If no particular device_id was requested (passed -1 to zram_add()) during new zram device creation, generate one automatically and return it back. So, schematically, device creation can be done as: dev_id = ioctl ZRAM_CTL_ADD -1 # dev_id == 1 or error code init device