Author: Julia Lawall <Julia.Lawall@lip6.fr> The various devm_ functions allocate memory that is released when a driver detaches. This patch uses these functions for data that is allocated in the probe function of a platform device and is only freed in the remove function. The patch makes some other cleanups. First, the original code used devm_kzalloc, …
Category: Linux
Mar 27 2013
charger-manager: Use kmemdup instead of kzalloc + memcpy
Author: Andrei Epure <epure.andrei@gmail.com> Patch found using coccinelle. Signed-off-by: Andrei Epure Signed-off-by: Anton Vorontsov — drivers/power/charger-manager.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/drivers/power/charger-manager.c b/drivers/power/charger-manager.c index 8acc3f8..fefc39f 100644 — a/drivers/power/charger-manager.c +++ b/drivers/power/charger-manager.c @@ -1485,13 +1485,12 @@ static int charger_manager_probe(struct platform_device *pdev) /* Basic Values. Unspecified are Null or …
Mar 25 2013
ASoC: core: Use PTR_RET function
Author: Alexandru Gheorghiu <gheorghiuandru@gmail.com> Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu Signed-off-by: Mark Brown — sound/soc/soc-io.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-) diff –git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index 29183ef..8ca9ecc 100644 — a/sound/soc/soc-io.c +++ b/sound/soc/soc-io.c @@ -158,10 +158,7 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, return …
Mar 25 2013
sound: oss: sb_common: Used kmemdup instead of kmalloc and memcpy
Author: Alexandru Gheorghiu <gheorghiuandru@gmail.com> Used kmemdup instead of replicating it’s behaviour with kmalloc followed by memcpy. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu Signed-off-by: Takashi Iwai — sound/oss/sb_common.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/sound/oss/sb_common.c b/sound/oss/sb_common.c index 7d42c54..851a1da 100644 — a/sound/oss/sb_common.c +++ b/sound/oss/sb_common.c @@ -626,13 +626,12 @@ int …
Mar 25 2013
sound: oss: uart401: Used kmemdup instead of kmalloc and memcpy
Author: Alexandru Gheorghiu <gheorghiuandru@gmail.com> Used kmemdup instead of replicating it’s behaviour with kmalloc followed by memcpy. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu Signed-off-by: Takashi Iwai — sound/oss/uart401.c | 11 +++++++—- 1 file changed, 7 insertions(+), 4 deletions(-) diff –git a/sound/oss/uart401.c b/sound/oss/uart401.c index 8e514a6..5433c6f 100644 — a/sound/oss/uart401.c +++ b/sound/oss/uart401.c @@ -352,23 +352,26 @@ int …
Mar 25 2013
iio:trigger: Introduce iio_tigger_{set,get}_drvdata
Author: Lars-Peter Clausen <lars@metafoo.de> Introduce iio_tigger_{set,get}_drvdata which allows to attach driver specific data to a trigger. The functions wrap access to the triggers private_data field and all current users are updated to use iio_tigger_{set,get}_drvdata instead of directly accessing the private_data field. This is the first step towards removing the private_data field from the iio_trigger struct. …
Mar 19 2013
drivers: video: omap2: dss: Use PTR_RET function
Author: Alexandru Gheorghiu <gheorghiuandru@gmail.com> Use PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu Signed-off-by: Tomi Valkeinen — drivers/video/omap2/dss/core.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-) diff –git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index f8779d4..60cc6fe 100644 — a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -181,10 +181,7 @@ int dss_debugfs_create_file(const char *name, void …
Mar 19 2013
drivers: platform: x86: Use PTR_RET function
Author: Alexandru Gheorghiu <gheorghiuandru@gmail.com> Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu Signed-off-by: Matthew Garrett — drivers/platform/x86/samsung-q10.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-) diff –git a/drivers/platform/x86/samsung-q10.c b/drivers/platform/x86/samsung-q10.c index 5f77005..1a90b62 100644 — a/drivers/platform/x86/samsung-q10.c +++ b/drivers/platform/x86/samsung-q10.c @@ -176,10 +176,7 @@ static int __init samsungq10_init(void) samsungq10_probe, …
Mar 18 2013
regulator: fan53555: Use PTR_RET function
Author: Alexandru Gheorghiu <gheorghiuandru@gmail.com> Used PTR_RET function instead of IS_ERR and PTR_ERR. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu Signed-off-by: Mark Brown — drivers/regulator/fan53555.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-) diff –git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 9165b0c..f0e1ae5 100644 — a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -219,9 +219,7 @@ static int fan53555_regulator_register(struct fan53555_device_info *di, …
Mar 16 2013
pata_octeon_cf: Use resource_size function
Author: Alexandru Gheorghiu <gheorghiuandru@gmail.com> Use resource_size function instead of explicit computation. Patch found using coccinelle. Signed-off-by: Alexandru Gheorghiu Signed-off-by: Jeff Garzik — drivers/ata/pata_octeon_cf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c index ff2e57f..e73bef3 100644 — a/drivers/ata/pata_octeon_cf.c +++ b/drivers/ata/pata_octeon_cf.c @@ -926,7 +926,7 @@ static int octeon_cf_probe(struct platform_device *pdev) goto …