@@ -823,7 +823,7 @@ static ssize_t lg4ff_alternate_modes_show(struct device *dev, struct device_attr
823823 for (i = 0 ; i < LG4FF_MODE_MAX_IDX ; i ++ ) {
824824 if (entry -> wdata .alternate_modes & BIT (i )) {
825825 /* Print tag and full name */
826- count += scnprintf (buf + count , PAGE_SIZE - count , "%s: %s" ,
826+ count += sysfs_emit_at (buf , count , "%s: %s" ,
827827 lg4ff_alternate_modes [i ].tag ,
828828 !lg4ff_alternate_modes [i ].product_id ? entry -> wdata .real_name : lg4ff_alternate_modes [i ].name );
829829 if (count >= PAGE_SIZE - 1 )
@@ -832,9 +832,9 @@ static ssize_t lg4ff_alternate_modes_show(struct device *dev, struct device_attr
832832 /* Mark the currently active mode with an asterisk */
833833 if (lg4ff_alternate_modes [i ].product_id == entry -> wdata .product_id ||
834834 (lg4ff_alternate_modes [i ].product_id == 0 && entry -> wdata .product_id == entry -> wdata .real_product_id ))
835- count += scnprintf (buf + count , PAGE_SIZE - count , " *\n" );
835+ count += sysfs_emit_at (buf , count , " *\n" );
836836 else
837- count += scnprintf (buf + count , PAGE_SIZE - count , "\n" );
837+ count += sysfs_emit_at (buf , count , "\n" );
838838
839839 if (count >= PAGE_SIZE - 1 )
840840 return count ;
0 commit comments