wifi: ath9k: use non devm for nvmem_cell_get
PATCH 1/1 wifi: ath9k: use non devm for nvmem_cell_get
There's absolutely no need to extend the lifetime of cell to post removal of the driver. It's only used in this function.
Signed-off-by Rosen Penev <[email protected]>
--- drivers/net/wireless/ath/ath9k/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath9k/init.c +2 -1
@@ -588,7 +588,7 @@ static int ath9k_nvmem_request_eeprom(struct ath_softc *sc)size_t len;int err; - cell =devm_nvmem_cell_get (sc->dev,"calibration" ); + cell =nvmem_cell_get (sc->dev,"calibration" );if (IS_ERR (cell)) { err =PTR_ERR (cell);
@@ -605,6 +605,7 @@ static int ath9k_nvmem_request_eeprom(struct ath_softc *sc) } buf =nvmem_cell_read (cell, &len); +nvmem_cell_put (cell);if (IS_ERR (buf))return PTR_ERR (buf);
--
2.53.0
Quoted 4 lines · Rosen Penev
There's absolutely no need to extend the lifetime of cell to post removal of the driver. It's only used in this function.
Signed-off-by Rosen Penev <[email protected]>
Right, makes sense.
Jeff Johnson
AppliedQuoted 4 lines · Rosen Penev
There's absolutely no need to extend the lifetime of cell to post removal of the driver. It's only used in this function.
Applied, thanks!
[1/1] wifi: ath9k: use non devm for nvmem_cell_get
commit: 22e8b91d18972f5e1de13af7f55555e550ad1818
Best regards,
Signature · 1 line
Jeff Johnson <[email protected]>