From: Sergey Senozhatsky Date: Thu, 25 Jun 2015 22:00:06 +0000 (-0700) Subject: zram: use idr instead of `zram_devices' array X-Git-Tag: omap-for-v4.2/fixes-rc1^2~106^2~85 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85508ec6cbc21645927b6ac05e3b2748119a3e23;p=pandora-kernel.git zram: use idr instead of `zram_devices' array This patch makes some preparations for on-demand device add/remove functionality. Remove `zram_devices' array and switch to id-to-pointer translation (idr). idr doesn't bloat zram struct with additional members, f.e. list_head, yet still provides ability to match the device_id with the device pointer. No user-space visible changes. [Julia.Lawall@lip6.fr: return -ENOMEM when `queue' alloc fails] Signed-off-by: Sergey Senozhatsky Reported-by: Julia Lawall Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed