@@ -1116,14 +1116,18 @@ static struct sys_device etr_port1_dev = {
11161116/*
11171117 * ETR class attributes
11181118 */
1119- static ssize_t etr_stepping_port_show (struct sysdev_class * class , char * buf )
1119+ static ssize_t etr_stepping_port_show (struct sysdev_class * class ,
1120+ struct sysdev_class_attribute * attr ,
1121+ char * buf )
11201122{
11211123 return sprintf (buf , "%i\n" , etr_port0 .esw .p );
11221124}
11231125
11241126static SYSDEV_CLASS_ATTR (stepping_port , 0400 , etr_stepping_port_show , NULL) ;
11251127
1126- static ssize_t etr_stepping_mode_show (struct sysdev_class * class , char * buf )
1128+ static ssize_t etr_stepping_mode_show (struct sysdev_class * class ,
1129+ struct sysdev_class_attribute * attr ,
1130+ char * buf )
11271131{
11281132 char * mode_str ;
11291133
@@ -1584,7 +1588,9 @@ static struct sysdev_class stp_sysclass = {
15841588 .name = "stp" ,
15851589};
15861590
1587- static ssize_t stp_ctn_id_show (struct sysdev_class * class , char * buf )
1591+ static ssize_t stp_ctn_id_show (struct sysdev_class * class ,
1592+ struct sysdev_class_attribute * attr ,
1593+ char * buf )
15881594{
15891595 if (!stp_online )
15901596 return - ENODATA ;
@@ -1594,7 +1600,9 @@ static ssize_t stp_ctn_id_show(struct sysdev_class *class, char *buf)
15941600
15951601static SYSDEV_CLASS_ATTR (ctn_id , 0400 , stp_ctn_id_show , NULL) ;
15961602
1597- static ssize_t stp_ctn_type_show (struct sysdev_class * class , char * buf )
1603+ static ssize_t stp_ctn_type_show (struct sysdev_class * class ,
1604+ struct sysdev_class_attribute * attr ,
1605+ char * buf )
15981606{
15991607 if (!stp_online )
16001608 return - ENODATA ;
@@ -1603,7 +1611,9 @@ static ssize_t stp_ctn_type_show(struct sysdev_class *class, char *buf)
16031611
16041612static SYSDEV_CLASS_ATTR (ctn_type , 0400 , stp_ctn_type_show , NULL) ;
16051613
1606- static ssize_t stp_dst_offset_show (struct sysdev_class * class , char * buf )
1614+ static ssize_t stp_dst_offset_show (struct sysdev_class * class ,
1615+ struct sysdev_class_attribute * attr ,
1616+ char * buf )
16071617{
16081618 if (!stp_online || !(stp_info .vbits & 0x2000 ))
16091619 return - ENODATA ;
@@ -1612,7 +1622,9 @@ static ssize_t stp_dst_offset_show(struct sysdev_class *class, char *buf)
16121622
16131623static SYSDEV_CLASS_ATTR (dst_offset , 0400 , stp_dst_offset_show , NULL) ;
16141624
1615- static ssize_t stp_leap_seconds_show (struct sysdev_class * class , char * buf )
1625+ static ssize_t stp_leap_seconds_show (struct sysdev_class * class ,
1626+ struct sysdev_class_attribute * attr ,
1627+ char * buf )
16161628{
16171629 if (!stp_online || !(stp_info .vbits & 0x8000 ))
16181630 return - ENODATA ;
@@ -1621,7 +1633,9 @@ static ssize_t stp_leap_seconds_show(struct sysdev_class *class, char *buf)
16211633
16221634static SYSDEV_CLASS_ATTR (leap_seconds , 0400 , stp_leap_seconds_show , NULL) ;
16231635
1624- static ssize_t stp_stratum_show (struct sysdev_class * class , char * buf )
1636+ static ssize_t stp_stratum_show (struct sysdev_class * class ,
1637+ struct sysdev_class_attribute * attr ,
1638+ char * buf )
16251639{
16261640 if (!stp_online )
16271641 return - ENODATA ;
@@ -1630,7 +1644,9 @@ static ssize_t stp_stratum_show(struct sysdev_class *class, char *buf)
16301644
16311645static SYSDEV_CLASS_ATTR (stratum , 0400 , stp_stratum_show , NULL) ;
16321646
1633- static ssize_t stp_time_offset_show (struct sysdev_class * class , char * buf )
1647+ static ssize_t stp_time_offset_show (struct sysdev_class * class ,
1648+ struct sysdev_class_attribute * attr ,
1649+ char * buf )
16341650{
16351651 if (!stp_online || !(stp_info .vbits & 0x0800 ))
16361652 return - ENODATA ;
@@ -1639,7 +1655,9 @@ static ssize_t stp_time_offset_show(struct sysdev_class *class, char *buf)
16391655
16401656static SYSDEV_CLASS_ATTR (time_offset , 0400 , stp_time_offset_show , NULL) ;
16411657
1642- static ssize_t stp_time_zone_offset_show (struct sysdev_class * class , char * buf )
1658+ static ssize_t stp_time_zone_offset_show (struct sysdev_class * class ,
1659+ struct sysdev_class_attribute * attr ,
1660+ char * buf )
16431661{
16441662 if (!stp_online || !(stp_info .vbits & 0x4000 ))
16451663 return - ENODATA ;
@@ -1649,7 +1667,9 @@ static ssize_t stp_time_zone_offset_show(struct sysdev_class *class, char *buf)
16491667static SYSDEV_CLASS_ATTR (time_zone_offset , 0400 ,
16501668 stp_time_zone_offset_show , NULL) ;
16511669
1652- static ssize_t stp_timing_mode_show (struct sysdev_class * class , char * buf )
1670+ static ssize_t stp_timing_mode_show (struct sysdev_class * class ,
1671+ struct sysdev_class_attribute * attr ,
1672+ char * buf )
16531673{
16541674 if (!stp_online )
16551675 return - ENODATA ;
@@ -1658,7 +1678,9 @@ static ssize_t stp_timing_mode_show(struct sysdev_class *class, char *buf)
16581678
16591679static SYSDEV_CLASS_ATTR (timing_mode , 0400 , stp_timing_mode_show , NULL) ;
16601680
1661- static ssize_t stp_timing_state_show (struct sysdev_class * class , char * buf )
1681+ static ssize_t stp_timing_state_show (struct sysdev_class * class ,
1682+ struct sysdev_class_attribute * attr ,
1683+ char * buf )
16621684{
16631685 if (!stp_online )
16641686 return - ENODATA ;
@@ -1667,12 +1689,15 @@ static ssize_t stp_timing_state_show(struct sysdev_class *class, char *buf)
16671689
16681690static SYSDEV_CLASS_ATTR (timing_state , 0400 , stp_timing_state_show , NULL) ;
16691691
1670- static ssize_t stp_online_show (struct sysdev_class * class , char * buf )
1692+ static ssize_t stp_online_show (struct sysdev_class * class ,
1693+ struct sysdev_class_attribute * attr ,
1694+ char * buf )
16711695{
16721696 return sprintf (buf , "%i\n" , stp_online );
16731697}
16741698
16751699static ssize_t stp_online_store (struct sysdev_class * class ,
1700+ struct sysdev_class_attribute * attr ,
16761701 const char * buf , size_t count )
16771702{
16781703 unsigned int value ;
0 commit comments