@@ -823,7 +823,7 @@ static ssize_t lg4ff_alternate_modes_show(struct device *dev, struct device_attr
823
823
for (i = 0 ; i < LG4FF_MODE_MAX_IDX ; i ++ ) {
824
824
if (entry -> wdata .alternate_modes & BIT (i )) {
825
825
/* Print tag and full name */
826
- count += scnprintf (buf + count , PAGE_SIZE - count , "%s: %s" ,
826
+ count += sysfs_emit_at (buf , count , "%s: %s" ,
827
827
lg4ff_alternate_modes [i ].tag ,
828
828
!lg4ff_alternate_modes [i ].product_id ? entry -> wdata .real_name : lg4ff_alternate_modes [i ].name );
829
829
if (count >= PAGE_SIZE - 1 )
@@ -832,9 +832,9 @@ static ssize_t lg4ff_alternate_modes_show(struct device *dev, struct device_attr
832
832
/* Mark the currently active mode with an asterisk */
833
833
if (lg4ff_alternate_modes [i ].product_id == entry -> wdata .product_id ||
834
834
(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" );
836
836
else
837
- count += scnprintf (buf + count , PAGE_SIZE - count , "\n" );
837
+ count += sysfs_emit_at (buf , count , "\n" );
838
838
839
839
if (count >= PAGE_SIZE - 1 )
840
840
return count ;
0 commit comments