@@ -320,7 +320,7 @@ static ssize_t temp1_limit_show(struct device *dev,
320
320
u8 index = to_sensor_dev_attr (attr )-> index ;
321
321
int temperature_limit = data -> temperature_limits [index ];
322
322
323
- return scnprintf (buf , PAGE_SIZE , "%d\n" , temperature_limit );
323
+ return sysfs_emit (buf , "%d\n" , temperature_limit );
324
324
}
325
325
326
326
static ssize_t humidity1_limit_show (struct device * dev ,
@@ -331,7 +331,7 @@ static ssize_t humidity1_limit_show(struct device *dev,
331
331
u8 index = to_sensor_dev_attr (attr )-> index ;
332
332
u32 humidity_limit = data -> humidity_limits [index ];
333
333
334
- return scnprintf (buf , PAGE_SIZE , "%u\n" , humidity_limit );
334
+ return sysfs_emit (buf , "%u\n" , humidity_limit );
335
335
}
336
336
337
337
/*
@@ -483,7 +483,7 @@ static ssize_t temp1_alarm_show(struct device *dev,
483
483
if (ret )
484
484
return ret ;
485
485
486
- return scnprintf (buf , PAGE_SIZE , "%d\n" , !!(buffer [0 ] & 0x04 ));
486
+ return sysfs_emit (buf , "%d\n" , !!(buffer [0 ] & 0x04 ));
487
487
}
488
488
489
489
static ssize_t humidity1_alarm_show (struct device * dev ,
@@ -498,7 +498,7 @@ static ssize_t humidity1_alarm_show(struct device *dev,
498
498
if (ret )
499
499
return ret ;
500
500
501
- return scnprintf (buf , PAGE_SIZE , "%d\n" , !!(buffer [0 ] & 0x08 ));
501
+ return sysfs_emit (buf , "%d\n" , !!(buffer [0 ] & 0x08 ));
502
502
}
503
503
504
504
static ssize_t heater_enable_show (struct device * dev ,
@@ -513,7 +513,7 @@ static ssize_t heater_enable_show(struct device *dev,
513
513
if (ret )
514
514
return ret ;
515
515
516
- return scnprintf (buf , PAGE_SIZE , "%d\n" , !!(buffer [0 ] & 0x20 ));
516
+ return sysfs_emit (buf , "%d\n" , !!(buffer [0 ] & 0x20 ));
517
517
}
518
518
519
519
static ssize_t heater_enable_store (struct device * dev ,
@@ -550,7 +550,7 @@ static ssize_t update_interval_show(struct device *dev,
550
550
{
551
551
struct sht3x_data * data = dev_get_drvdata (dev );
552
552
553
- return scnprintf (buf , PAGE_SIZE , "%u\n" ,
553
+ return sysfs_emit (buf , "%u\n" ,
554
554
mode_to_update_interval [data -> mode ]);
555
555
}
556
556
0 commit comments