@@ -555,7 +555,7 @@ static ssize_t attr_fn_lock_show(struct device *dev,
555555 struct hid_device * hdev = to_hid_device (dev );
556556 struct lenovo_drvdata * data = hid_get_drvdata (hdev );
557557
558- return snprintf (buf , PAGE_SIZE , "%u\n" , data -> fn_lock );
558+ return sysfs_emit (buf , "%u\n" , data -> fn_lock );
559559}
560560
561561static ssize_t attr_fn_lock_store (struct device * dev ,
@@ -599,8 +599,7 @@ static ssize_t attr_sensitivity_show_cptkbd(struct device *dev,
599599 struct hid_device * hdev = to_hid_device (dev );
600600 struct lenovo_drvdata * cptkbd_data = hid_get_drvdata (hdev );
601601
602- return snprintf (buf , PAGE_SIZE , "%u\n" ,
603- cptkbd_data -> sensitivity );
602+ return sysfs_emit (buf , "%u\n" , cptkbd_data -> sensitivity );
604603}
605604
606605static ssize_t attr_sensitivity_store_cptkbd (struct device * dev ,
@@ -628,8 +627,8 @@ static ssize_t attr_middleclick_workaround_show_cptkbd(struct device *dev,
628627 struct hid_device * hdev = to_hid_device (dev );
629628 struct lenovo_drvdata * cptkbd_data = hid_get_drvdata (hdev );
630629
631- return snprintf (buf , PAGE_SIZE , "%u\n" ,
632- cptkbd_data -> middleclick_workaround_cptkbd );
630+ return sysfs_emit (buf , "%u\n" ,
631+ cptkbd_data -> middleclick_workaround_cptkbd );
633632}
634633
635634static ssize_t attr_middleclick_workaround_store_cptkbd (struct device * dev ,
@@ -809,7 +808,7 @@ static ssize_t attr_press_to_select_show_tpkbd(struct device *dev,
809808 struct hid_device * hdev = to_hid_device (dev );
810809 struct lenovo_drvdata * data_pointer = hid_get_drvdata (hdev );
811810
812- return snprintf (buf , PAGE_SIZE , "%u\n" , data_pointer -> press_to_select );
811+ return sysfs_emit (buf , "%u\n" , data_pointer -> press_to_select );
813812}
814813
815814static ssize_t attr_press_to_select_store_tpkbd (struct device * dev ,
@@ -839,7 +838,7 @@ static ssize_t attr_dragging_show_tpkbd(struct device *dev,
839838 struct hid_device * hdev = to_hid_device (dev );
840839 struct lenovo_drvdata * data_pointer = hid_get_drvdata (hdev );
841840
842- return snprintf (buf , PAGE_SIZE , "%u\n" , data_pointer -> dragging );
841+ return sysfs_emit (buf , "%u\n" , data_pointer -> dragging );
843842}
844843
845844static ssize_t attr_dragging_store_tpkbd (struct device * dev ,
@@ -869,7 +868,7 @@ static ssize_t attr_release_to_select_show_tpkbd(struct device *dev,
869868 struct hid_device * hdev = to_hid_device (dev );
870869 struct lenovo_drvdata * data_pointer = hid_get_drvdata (hdev );
871870
872- return snprintf (buf , PAGE_SIZE , "%u\n" , data_pointer -> release_to_select );
871+ return sysfs_emit (buf , "%u\n" , data_pointer -> release_to_select );
873872}
874873
875874static ssize_t attr_release_to_select_store_tpkbd (struct device * dev ,
@@ -899,7 +898,7 @@ static ssize_t attr_select_right_show_tpkbd(struct device *dev,
899898 struct hid_device * hdev = to_hid_device (dev );
900899 struct lenovo_drvdata * data_pointer = hid_get_drvdata (hdev );
901900
902- return snprintf (buf , PAGE_SIZE , "%u\n" , data_pointer -> select_right );
901+ return sysfs_emit (buf , "%u\n" , data_pointer -> select_right );
903902}
904903
905904static ssize_t attr_select_right_store_tpkbd (struct device * dev ,
@@ -929,8 +928,7 @@ static ssize_t attr_sensitivity_show_tpkbd(struct device *dev,
929928 struct hid_device * hdev = to_hid_device (dev );
930929 struct lenovo_drvdata * data_pointer = hid_get_drvdata (hdev );
931930
932- return snprintf (buf , PAGE_SIZE , "%u\n" ,
933- data_pointer -> sensitivity );
931+ return sysfs_emit (buf , "%u\n" , data_pointer -> sensitivity );
934932}
935933
936934static ssize_t attr_sensitivity_store_tpkbd (struct device * dev ,
@@ -958,8 +956,7 @@ static ssize_t attr_press_speed_show_tpkbd(struct device *dev,
958956 struct hid_device * hdev = to_hid_device (dev );
959957 struct lenovo_drvdata * data_pointer = hid_get_drvdata (hdev );
960958
961- return snprintf (buf , PAGE_SIZE , "%u\n" ,
962- data_pointer -> press_speed );
959+ return sysfs_emit (buf , "%u\n" , data_pointer -> press_speed );
963960}
964961
965962static ssize_t attr_press_speed_store_tpkbd (struct device * dev ,
0 commit comments