Category: Linux

drivers/video/wm8505fb.c: use devm_ functions

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, …

Continue reading

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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

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 …

Continue reading

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. …

Continue reading

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 …

Continue reading

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, …

Continue reading

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, …

Continue reading

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 …

Continue reading

BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.