@@ -1493,65 +1493,34 @@ static void check_efi_reboot(void)
1493
1493
}
1494
1494
1495
1495
/* Setup user proc fs files */
1496
- static int proc_hubbed_show (struct seq_file * file , void * data )
1496
+ static int __maybe_unused proc_hubbed_show (struct seq_file * file , void * data )
1497
1497
{
1498
1498
seq_printf (file , "0x%x\n" , uv_hubbed_system );
1499
1499
return 0 ;
1500
1500
}
1501
1501
1502
- static int proc_hubless_show (struct seq_file * file , void * data )
1502
+ static int __maybe_unused proc_hubless_show (struct seq_file * file , void * data )
1503
1503
{
1504
1504
seq_printf (file , "0x%x\n" , uv_hubless_system );
1505
1505
return 0 ;
1506
1506
}
1507
1507
1508
- static int proc_oemid_show (struct seq_file * file , void * data )
1508
+ static int __maybe_unused proc_oemid_show (struct seq_file * file , void * data )
1509
1509
{
1510
1510
seq_printf (file , "%s/%s\n" , oem_id , oem_table_id );
1511
1511
return 0 ;
1512
1512
}
1513
1513
1514
- static int proc_hubbed_open (struct inode * inode , struct file * file )
1515
- {
1516
- return single_open (file , proc_hubbed_show , (void * )NULL );
1517
- }
1518
-
1519
- static int proc_hubless_open (struct inode * inode , struct file * file )
1520
- {
1521
- return single_open (file , proc_hubless_show , (void * )NULL );
1522
- }
1523
-
1524
- static int proc_oemid_open (struct inode * inode , struct file * file )
1525
- {
1526
- return single_open (file , proc_oemid_show , (void * )NULL );
1527
- }
1528
-
1529
- /* (struct is "non-const" as open function is set at runtime) */
1530
- static struct file_operations proc_version_fops = {
1531
- .read = seq_read ,
1532
- .llseek = seq_lseek ,
1533
- .release = single_release ,
1534
- };
1535
-
1536
- static const struct file_operations proc_oemid_fops = {
1537
- .open = proc_oemid_open ,
1538
- .read = seq_read ,
1539
- .llseek = seq_lseek ,
1540
- .release = single_release ,
1541
- };
1542
-
1543
1514
static __init void uv_setup_proc_files (int hubless )
1544
1515
{
1545
1516
struct proc_dir_entry * pde ;
1546
- char * name = hubless ? "hubless" : "hubbed" ;
1547
1517
1548
1518
pde = proc_mkdir (UV_PROC_NODE , NULL );
1549
- proc_create ("oemid" , 0 , pde , & proc_oemid_fops );
1550
- proc_create (name , 0 , pde , & proc_version_fops );
1519
+ proc_create_single ("oemid" , 0 , pde , proc_oemid_show );
1551
1520
if (hubless )
1552
- proc_version_fops . open = proc_hubless_open ;
1521
+ proc_create_single ( "hubless" , 0 , pde , proc_hubless_show ) ;
1553
1522
else
1554
- proc_version_fops . open = proc_hubbed_open ;
1523
+ proc_create_single ( "hubbed" , 0 , pde , proc_hubbed_show ) ;
1555
1524
}
1556
1525
1557
1526
/* Initialize UV hubless systems */
0 commit comments