mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
param: simple locking for sysfs-writable charp parameters
Since the writing to sysfs can free the old one, we need to block that when we access the charp variables. Signed-off-by: Rusty Russell <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Tested-by: Phil Carmody <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Dan Williams <[email protected]> Cc: John W. Linville <[email protected]> Cc: Jing Huang <[email protected]> Cc: James E.J. Bottomley <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Johannes Berg <[email protected]> Cc: David S. Miller <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected]
This commit is contained in:
parent
dca4130639
commit
d6d1b650ae
7 changed files with 24 additions and 0 deletions
|
|
@ -1577,6 +1577,7 @@ static void cmvs_file_name(struct uea_softc *sc, char *const cmv_name, int ver)
|
|||
char file_arr[] = "CMVxy.bin";
|
||||
char *file;
|
||||
|
||||
kparam_block_sysfs_write(cmv_file);
|
||||
/* set proper name corresponding modem version and line type */
|
||||
if (cmv_file[sc->modem_index] == NULL) {
|
||||
if (UEA_CHIP_VERSION(sc) == ADI930)
|
||||
|
|
@ -1595,6 +1596,7 @@ static void cmvs_file_name(struct uea_softc *sc, char *const cmv_name, int ver)
|
|||
strlcat(cmv_name, file, UEA_FW_NAME_MAX);
|
||||
if (ver == 2)
|
||||
strlcat(cmv_name, ".v2", UEA_FW_NAME_MAX);
|
||||
kparam_unblock_sysfs_write(cmv_file);
|
||||
}
|
||||
|
||||
static int request_cmvs_old(struct uea_softc *sc,
|
||||
|
|
|
|||
Loading…
Reference in a new issue