From 3bc3ac098de1c999020e40601d2db99ae5e1b2f0 Mon Sep 17 00:00:00 2001 From: Eyal Reizer Date: Wed, 29 Jan 2014 09:24:06 +0200 Subject: [PATCH 4/7] st_kim: do not use debugfs functions if not enabled the probe function was using debugfs apis without checking if CONFIG_DEBUG_FS was enabled resulting with runtime errors. Fix this so these apis will only be used if the switch is active. Signed-off-by: Eyal Reizer --- drivers/misc/ti-st/st_kim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 83269f1..fbf4dfd 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c @@ -778,6 +778,7 @@ static int kim_probe(struct platform_device *pdev) kim_gdata->baud_rate = pdata->baud_rate; pr_info("sysfs entries created\n"); +#ifdef CONFIG_DEBUG_FS kim_debugfs_dir = debugfs_create_dir("ti-st", NULL); if (IS_ERR(kim_debugfs_dir)) { pr_err(" debugfs entries creation failed "); @@ -794,6 +795,7 @@ static int kim_probe(struct platform_device *pdev) err_debugfs_dir: sysfs_remove_group(&pdev->dev.kobj, &uim_attr_grp); +#endif err_sysfs_group: st_core_exit(kim_gdata->core_data); -- 1.7.9.5