File tree Expand file tree Collapse file tree 3 files changed +2
-15
lines changed
drivers/infiniband/hw/qib Expand file tree Collapse file tree 3 files changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -1359,7 +1359,6 @@ static inline u32 qib_get_rcvhdrtail(const struct qib_ctxtdata *rcd)
1359
1359
* sysfs interface.
1360
1360
*/
1361
1361
1362
- extern const char ib_qib_version [];
1363
1362
extern const struct attribute_group qib_attr_group ;
1364
1363
extern const struct attribute_group * qib_attr_port_groups [];
1365
1364
Original file line number Diff line number Diff line change 44
44
45
45
#include "qib.h"
46
46
47
- /*
48
- * The size has to be longer than this string, so we can append
49
- * board/chip information to it in the init code.
50
- */
51
- const char ib_qib_version [] = QIB_DRIVER_VERSION "\n" ;
52
-
53
47
DEFINE_MUTEX (qib_mutex ); /* general driver use */
54
48
55
49
unsigned qib_ibmtu ;
Original file line number Diff line number Diff line change @@ -585,13 +585,7 @@ static ssize_t hca_type_show(struct device *device,
585
585
static DEVICE_ATTR_RO (hca_type );
586
586
static DEVICE_ATTR (board_id , 0444 , hca_type_show , NULL) ;
587
587
588
- static ssize_t version_show (struct device * device ,
589
- struct device_attribute * attr , char * buf )
590
- {
591
- /* The string printed here is already newline-terminated. */
592
- return sysfs_emit (buf , "%s" , (char * )ib_qib_version );
593
- }
594
- static DEVICE_ATTR_RO (version );
588
+ static DEVICE_STRING_ATTR_RO (version , 0444 , QIB_DRIVER_VERSION ) ;
595
589
596
590
static ssize_t boardversion_show (struct device * device ,
597
591
struct device_attribute * attr , char * buf )
@@ -721,7 +715,7 @@ static struct attribute *qib_attributes[] = {
721
715
& dev_attr_hw_rev .attr ,
722
716
& dev_attr_hca_type .attr ,
723
717
& dev_attr_board_id .attr ,
724
- & dev_attr_version .attr ,
718
+ & dev_attr_version .attr . attr ,
725
719
& dev_attr_nctxts .attr ,
726
720
& dev_attr_nfreectxts .attr ,
727
721
& dev_attr_serial .attr ,
You can’t perform that action at this time.
0 commit comments