resources: Add device-managed request/release_resource()

Provide device-managed implementations of the request_resource() and
release_resource() functions.  Upon failure to request a resource, the new
devm_request_resource() function will output an error message for
consistent error reporting.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Thierry Reding 2014-08-01 14:15:10 +02:00 • committed by Bjorn Helgaas
commit 8d38821cbc
3 changed files with 77 additions and 0 deletions