@@ -314,7 +314,7 @@ static ssize_t show_id(struct device *dev,
314314 struct led_classdev * led_cdev = dev_get_drvdata (dev );
315315 struct lm3533_led * led = to_lm3533_led (led_cdev );
316316
317- return scnprintf (buf , PAGE_SIZE , "%d\n" , led -> id );
317+ return sysfs_emit (buf , "%d\n" , led -> id );
318318}
319319
320320/*
@@ -344,7 +344,7 @@ static ssize_t show_risefalltime(struct device *dev,
344344 if (ret )
345345 return ret ;
346346
347- return scnprintf (buf , PAGE_SIZE , "%x\n" , val );
347+ return sysfs_emit (buf , "%x\n" , val );
348348}
349349
350350static ssize_t show_risetime (struct device * dev ,
@@ -415,7 +415,7 @@ static ssize_t show_als_channel(struct device *dev,
415415
416416 channel = (val & LM3533_REG_CTRLBANK_BCONF_ALS_CHANNEL_MASK ) + 1 ;
417417
418- return scnprintf (buf , PAGE_SIZE , "%u\n" , channel );
418+ return sysfs_emit (buf , "%u\n" , channel );
419419}
420420
421421static ssize_t store_als_channel (struct device * dev ,
@@ -465,7 +465,7 @@ static ssize_t show_als_en(struct device *dev,
465465
466466 enable = val & LM3533_REG_CTRLBANK_BCONF_ALS_EN_MASK ;
467467
468- return scnprintf (buf , PAGE_SIZE , "%d\n" , enable );
468+ return sysfs_emit (buf , "%d\n" , enable );
469469}
470470
471471static ssize_t store_als_en (struct device * dev ,
@@ -518,7 +518,7 @@ static ssize_t show_linear(struct device *dev,
518518 else
519519 linear = 0 ;
520520
521- return scnprintf (buf , PAGE_SIZE , "%x\n" , linear );
521+ return sysfs_emit (buf , "%x\n" , linear );
522522}
523523
524524static ssize_t store_linear (struct device * dev ,
@@ -564,7 +564,7 @@ static ssize_t show_pwm(struct device *dev,
564564 if (ret )
565565 return ret ;
566566
567- return scnprintf (buf , PAGE_SIZE , "%u\n" , val );
567+ return sysfs_emit (buf , "%u\n" , val );
568568}
569569
570570static ssize_t store_pwm (struct device * dev ,
0 commit comments