From 6c7f1e2f12f6f37ddda01180c9e5c407eccce616 Mon Sep 17 00:00:00 2001 From: Aaron Lu Date: Wed, 23 Jan 2013 15:09:31 +0800 Subject: [PATCH] [SCSI] sr: support runtime pm This patch adds runtime pm support for sr. It did this by increasing the runtime usage_count of the device when its block device is accessed. And decreasing the runtime usage_count of the device when the access is done. If there is media inside, runtime suspend is not allowed as we don't always know if the ODD is being used or not. The idea is discussed here: http://thread.gmane.org/gmane.linux.acpi.devel/55243/focus=52703 and the restriction to check media inside is discussed here: http://thread.gmane.org/gmane.linux.ide/53665/focus=58836 Signed-off-by: Aaron Lu Acked-by: Alan Stern Acked-by: James Bottomley Signed-off-by: Jeff Garzik --- Reading git-format-patch failed