@@ -1305,6 +1305,7 @@ static int fwu_do_write_config(void)
13051305 return retval ;
13061306}
13071307
1308+ #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS
13081309static int fwu_start_write_config (void )
13091310{
13101311 int retval ;
@@ -1357,6 +1358,7 @@ static int fwu_start_write_config(void)
13571358
13581359 return retval ;
13591360}
1361+ #endif
13601362
13611363static int fwu_do_write_lockdown (bool reset )
13621364{
@@ -1404,6 +1406,7 @@ static int fwu_do_write_lockdown(bool reset)
14041406 return retval ;
14051407}
14061408
1409+ #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS
14071410static int fwu_start_write_lockdown (void )
14081411{
14091412 if (parse_header ())
@@ -1505,6 +1508,7 @@ static int fwu_do_read_config(void)
15051508exit :
15061509 return retval ;
15071510}
1511+ #endif
15081512
15091513static int fwu_do_reflash (void )
15101514{
@@ -1730,6 +1734,7 @@ int synaptics_fw_updater(void)
17301734}
17311735EXPORT_SYMBOL (synaptics_fw_updater );
17321736
1737+ #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS
17331738static ssize_t fwu_sysfs_show_image (struct file * data_file ,
17341739 struct kobject * kobj , struct bin_attribute * attributes ,
17351740 char * buf , loff_t pos , size_t count )
@@ -2154,6 +2159,7 @@ static ssize_t fwu_sysfs_package_id_show(struct device *dev,
21542159 (pkg_id [1 ] << 8 ) | pkg_id [0 ],
21552160 (pkg_id [3 ] << 8 ) | pkg_id [2 ]);
21562161}
2162+ #endif
21572163
21582164static int synaptics_rmi4_debug_dump_info (struct seq_file * m , void * v )
21592165{
@@ -2187,6 +2193,7 @@ static void synaptics_rmi4_fwu_attn(struct synaptics_rmi4_data *rmi4_data,
21872193 return ;
21882194}
21892195
2196+ #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS
21902197static struct bin_attribute dev_attr_data = {
21912198 .attr = {
21922199 .name = "data" ,
@@ -2196,8 +2203,10 @@ static struct bin_attribute dev_attr_data = {
21962203 .read = fwu_sysfs_show_image ,
21972204 .write = fwu_sysfs_store_image ,
21982205};
2206+ #endif
21992207
22002208static struct device_attribute attrs [] = {
2209+ #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS
22012210 __ATTR (fw_name , S_IRUGO | S_IWUSR | S_IWGRP ,
22022211 fwu_sysfs_image_name_show ,
22032212 fwu_sysfs_image_name_store ),
@@ -2246,6 +2255,7 @@ static struct device_attribute attrs[] = {
22462255 __ATTR (package_id , S_IRUGO ,
22472256 fwu_sysfs_package_id_show ,
22482257 synaptics_rmi4_store_error ),
2258+ #endif
22492259};
22502260
22512261
@@ -2325,6 +2335,7 @@ static int synaptics_rmi4_fwu_init(struct synaptics_rmi4_data *rmi4_data)
23252335 fwu -> initialized = true;
23262336 fwu -> polling_mode = false;
23272337
2338+ #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS
23282339 retval = sysfs_create_bin_file (& rmi4_data -> i2c_client -> dev .kobj ,
23292340 & dev_attr_data );
23302341 if (retval < 0 ) {
@@ -2333,6 +2344,7 @@ static int synaptics_rmi4_fwu_init(struct synaptics_rmi4_data *rmi4_data)
23332344 __func__ );
23342345 goto exit_free_mem ;
23352346 }
2347+ #endif
23362348
23372349 for (attr_count = 0 ; attr_count < ARRAY_SIZE (attrs ); attr_count ++ ) {
23382350 retval = sysfs_create_file (& rmi4_data -> i2c_client -> dev .kobj ,
@@ -2380,7 +2392,9 @@ static int synaptics_rmi4_fwu_init(struct synaptics_rmi4_data *rmi4_data)
23802392 & attrs [attr_count ].attr );
23812393 }
23822394
2395+ #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS
23832396 sysfs_remove_bin_file (& rmi4_data -> input_dev -> dev .kobj , & dev_attr_data );
2397+ #endif
23842398
23852399exit_free_mem :
23862400 kfree (fwu -> fn_ptr );
@@ -2397,7 +2411,9 @@ static void synaptics_rmi4_fwu_remove(struct synaptics_rmi4_data *rmi4_data)
23972411{
23982412 unsigned char attr_count ;
23992413
2414+ #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS
24002415 sysfs_remove_bin_file (& rmi4_data -> input_dev -> dev .kobj , & dev_attr_data );
2416+ #endif
24012417
24022418 for (attr_count = 0 ; attr_count < ARRAY_SIZE (attrs ); attr_count ++ ) {
24032419 sysfs_remove_file (& rmi4_data -> input_dev -> dev .kobj ,
0 commit comments