backports: fix device_release_driver
authorJohannes Berg <johannes.berg@intel.com>
Wed, 7 Aug 2013 09:40:09 +0000 (11:40 +0200)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Tue, 13 Aug 2013 01:40:17 +0000 (18:40 -0700)
commit38dbdde48f135c6b8fd1524eacf79041c7b5899a
tree2d4d73458116f03ee0f10d8df41af2fc5100fd5a
parentb285746689278574f2b4b15f015892686fc42a2b
backports: fix device_release_driver

The new macro, introduced by

commit 9f5876fa9cfb8cd6f450c200043ca7e31915f976
Author: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Date:   Thu Jul 18 16:40:55 2013 -0700

    backports: backport drvdata = NULL core driver fixes

evaluates its argument multiple times, causing crashes as
there are potential side-effects of the called code and/or
the arguments.

Fix this by converting it to static inlines.

Also remove the driver_probe_device() macro that has the
same issue, but tries to wrap a function that isn't even
available outside the driver core code in any kernel.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
backport/backport-include/linux/device.h