]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - wilink8-wlan/build-utilites.git/blob - patches/kernel_patches/imx-3.10.53/0004-st_kim-do-not-use-debugfs-functions-if-not-enabled.patch
build_wl18xx: add patch mechanism and bluetooth components
[wilink8-wlan/build-utilites.git] / patches / kernel_patches / imx-3.10.53 / 0004-st_kim-do-not-use-debugfs-functions-if-not-enabled.patch
1 From 3bc3ac098de1c999020e40601d2db99ae5e1b2f0 Mon Sep 17 00:00:00 2001
2 From: Eyal Reizer <eyalr@ti.com>
3 Date: Wed, 29 Jan 2014 09:24:06 +0200
4 Subject: [PATCH 4/7] st_kim: do not use debugfs functions if not enabled
6 the probe function was using debugfs apis without checking if
7 CONFIG_DEBUG_FS was enabled resulting with runtime errors.
8 Fix this so these apis will only be used if the switch is active.
10 Signed-off-by: Eyal Reizer <eyalr@ti.com>
11 ---
12  drivers/misc/ti-st/st_kim.c |    2 ++
13  1 file changed, 2 insertions(+)
15 diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
16 index 83269f1..fbf4dfd 100644
17 --- a/drivers/misc/ti-st/st_kim.c
18 +++ b/drivers/misc/ti-st/st_kim.c
19 @@ -778,6 +778,7 @@ static int kim_probe(struct platform_device *pdev)
20         kim_gdata->baud_rate = pdata->baud_rate;
21         pr_info("sysfs entries created\n");
22  
23 +#ifdef CONFIG_DEBUG_FS
24         kim_debugfs_dir = debugfs_create_dir("ti-st", NULL);
25         if (IS_ERR(kim_debugfs_dir)) {
26                 pr_err(" debugfs entries creation failed ");
27 @@ -794,6 +795,7 @@ static int kim_probe(struct platform_device *pdev)
28  
29  err_debugfs_dir:
30         sysfs_remove_group(&pdev->dev.kobj, &uim_attr_grp);
31 +#endif
32  
33  err_sysfs_group:
34         st_core_exit(kim_gdata->core_data);
35 -- 
36 1.7.9.5