mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Driver core patches for 4.3-rc1
Here is the new patches for the driver core / sysfs for 4.3-rc1. Very small number of changes here, all the details are in the shortlog, nothing major happening at all this kernel release, which is nice to see. Signed-off-by: Greg Kroah-Hartman <[email protected]> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlXV9EwACgkQMUfUDdst+ylv1ACgj7srYyvumehX1zfRVzEWNuez chQAoKHnSpDMME/WmhQQRxzQ5pfd1Pni =uGHg -----END PGP SIGNATURE----- Merge tag 'driver-core-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the new patches for the driver core / sysfs for 4.3-rc1. Very small number of changes here, all the details are in the shortlog, nothing major happening at all this kernel release, which is nice to see" * tag 'driver-core-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: bus: subsys: update return type of ->remove_dev() to void driver core: correct device's shutdown order driver core: fix docbook for device_private.device selftests: firmware: skip timeout checks for kernels without user mode helper kernel, cpu: Remove bogus __ref annotations cpu: Remove bogus __ref annotation of cpu_subsys_online() firmware: fix wrong memory deallocation in fw_add_devm_name() sysfs.txt: update show method notes about sprintf/snprintf/scnprintf usage devres: fix devres_get()
This commit is contained in:
commit
1af115d675
16 changed files with 118 additions and 41 deletions
|
|
@ -9,7 +9,15 @@ modprobe test_firmware
|
|||
|
||||
DIR=/sys/devices/virtual/misc/test_firmware
|
||||
|
||||
OLD_TIMEOUT=$(cat /sys/class/firmware/timeout)
|
||||
# CONFIG_FW_LOADER_USER_HELPER has a sysfs class under /sys/class/firmware/
|
||||
# These days no one enables CONFIG_FW_LOADER_USER_HELPER so check for that
|
||||
# as an indicator for CONFIG_FW_LOADER_USER_HELPER.
|
||||
HAS_FW_LOADER_USER_HELPER=$(if [ -d /sys/class/firmware/ ]; then echo yes; else echo no; fi)
|
||||
|
||||
if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then
|
||||
OLD_TIMEOUT=$(cat /sys/class/firmware/timeout)
|
||||
fi
|
||||
|
||||
OLD_FWPATH=$(cat /sys/module/firmware_class/parameters/path)
|
||||
|
||||
FWPATH=$(mktemp -d)
|
||||
|
|
@ -17,7 +25,9 @@ FW="$FWPATH/test-firmware.bin"
|
|||
|
||||
test_finish()
|
||||
{
|
||||
echo "$OLD_TIMEOUT" >/sys/class/firmware/timeout
|
||||
if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then
|
||||
echo "$OLD_TIMEOUT" >/sys/class/firmware/timeout
|
||||
fi
|
||||
echo -n "$OLD_PATH" >/sys/module/firmware_class/parameters/path
|
||||
rm -f "$FW"
|
||||
rmdir "$FWPATH"
|
||||
|
|
@ -25,8 +35,11 @@ test_finish()
|
|||
|
||||
trap "test_finish" EXIT
|
||||
|
||||
# Turn down the timeout so failures don't take so long.
|
||||
echo 1 >/sys/class/firmware/timeout
|
||||
if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then
|
||||
# Turn down the timeout so failures don't take so long.
|
||||
echo 1 >/sys/class/firmware/timeout
|
||||
fi
|
||||
|
||||
# Set the kernel search path.
|
||||
echo -n "$FWPATH" >/sys/module/firmware_class/parameters/path
|
||||
|
||||
|
|
@ -41,7 +54,9 @@ if diff -q "$FW" /dev/test_firmware >/dev/null ; then
|
|||
echo "$0: firmware was not expected to match" >&2
|
||||
exit 1
|
||||
else
|
||||
echo "$0: timeout works"
|
||||
if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then
|
||||
echo "$0: timeout works"
|
||||
fi
|
||||
fi
|
||||
|
||||
# This should succeed via kernel load or will fail after 1 second after
|
||||
|
|
|
|||
|
|
@ -9,7 +9,17 @@ modprobe test_firmware
|
|||
|
||||
DIR=/sys/devices/virtual/misc/test_firmware
|
||||
|
||||
OLD_TIMEOUT=$(cat /sys/class/firmware/timeout)
|
||||
# CONFIG_FW_LOADER_USER_HELPER has a sysfs class under /sys/class/firmware/
|
||||
# These days no one enables CONFIG_FW_LOADER_USER_HELPER so check for that
|
||||
# as an indicator for CONFIG_FW_LOADER_USER_HELPER.
|
||||
HAS_FW_LOADER_USER_HELPER=$(if [ -d /sys/class/firmware/ ]; then echo yes; else echo no; fi)
|
||||
|
||||
if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then
|
||||
OLD_TIMEOUT=$(cat /sys/class/firmware/timeout)
|
||||
else
|
||||
echo "usermode helper disabled so ignoring test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
FWPATH=$(mktemp -d)
|
||||
FW="$FWPATH/test-firmware.bin"
|
||||
|
|
|
|||
Loading…
Reference in a new issue