target/linux/generic/files/drivers/net/phy/swconfig_leds.c
/* speed_mask file handler - display value */
speed_mask file handler - display value
speed_mask file handler - display value
static ssize_t swconfig_trig_speed_mask_show(struct device *dev,
					     struct device_attribute *attr,
					     char *buf)
{
	struct led_classdev *led_cdev = dev_get_drvdata(dev);
	struct swconfig_trig_data *trig_data = led_cdev->trigger_data;
	u8 speed_mask;
	read_lock(&trig_data->lock);
	speed_mask = trig_data->speed_mask;
	read_unlock(&trig_data->lock);
	sprintf(buf, "%#x\n", speed_mask);
	return strlen(buf) + 1;
}
static ssize_t swconfig_trig_speed_mask_show ( struct device * dev , struct device_attribute * attr , char * buf ) { struct led_classdev * led_cdev = dev_get_drvdata ( dev ) ; struct swconfig_trig_data * trig_data = led_cdev -> trigger_data ; u8 speed_mask ; read_lock ( & trig_data -> lock ) ; speed_mask = trig_data -> speed_mask ; read_unlock ( & trig_data -> lock ) ; sprintf ( buf , " \n " , speed_mask ) ; return strlen ( buf ) + 1 ; }
speed_mask file handler - display value
speed_mask file handler - display value