firmware: fix a few build errors
PATCH 2/2 firmware: fix a few build errors
From: Randy Dunlap <[email protected]>
Fix one typo (comma to semi-colon).
Fix sysfs externs (just use sysfs.h for prototypes).
Documentation/firmware_class/firmware_sample_firmware_class.c:37: error: conflicting types for 'sysfs_remove_bin_file' include/linux/sysfs.h:100: error: previous declaration of 'sysfs_remove_bin_file' was here
Still has a build error:
ERROR: "firmware_class" [samples/firmware_class/firmware_sample_firmware_class.ko] undefined!
--- samples/firmware_class/firmware_sample_firmware_class.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
samples/firmware_class/firmware_sample_firmware_class.c +1 -4
@@ -33,9 +33,6 @@ struct class_device_attribute *to_class_ return container_of(_attr,struct class_device_attribute,attr); } -int sysfs_create_bin_file (struct kobject * kobj,struct bin_attribute * attr); -int sysfs_remove_bin_file (struct kobject * kobj,struct bin_attribute * attr); -struct firmware_priv {char fw_id[FIRMWARE_NAME_MAX ];s32 loading:2 ;
@@ -127,7 +124,7 @@ static int fw_setup_class_device(struct class_dev->class_id[BUS_ID_SIZE -1 ] ='\0' ; class_dev->dev = device; - class_dev->class = &firmware_class, + class_dev->class = &firmware_class;class_set_devdata (class_dev, fw_priv); retval =class_device_register (class_dev);if (retval){
Hi Randy,
Quoted 9 lines
Fix one typo (comma to semi-colon).
Fix sysfs externs (just usesysfs.hfor prototypes).
Documentation/firmware_class/firmware_sample_firmware_class.c:37: error: conflicting types for 'sysfs_remove_bin_file'include/linux/sysfs.h:100: error: previous declaration of 'sysfs_remove_bin_file' was hereStill has a build error:
ERROR: "firmware_class" [samples/firmware_class/firmware_sample_firmware_class.ko] undefined!
while you are at it, can you also fix the broken coding style in it?
Regards
Marcel
Quoted 5 lines · Marcel Holtmann
Hi Randy,
Quoted 3 lines
Fix one typo (comma to semi-colon).
Fix sysfs externs (just usesysfs.hfor prototypes).
Quoted 8 lines
Quoted 6 lines
Documentation/firmware_class/firmware_sample_firmware_class.c:37: error: conflicting types for 'sysfs_remove_bin_file'include/linux/sysfs.h:100: error: previous declaration of 'sysfs_remove_bin_file' was hereStill has a build error:
ERROR: "firmware_class" [samples/firmware_class/firmware_sample_firmware_class.ko] undefined!while you are at it, can you also fix the broken coding style in it?
Greg will do that while he is fixing the <firmware_class> data build error. :)
Signature · 1 line
~Randy