pc87427.c (27eb2c4b3d3e13f376a359e293c212a2e9407af5) | pc87427.c (a8b3a3a53f9a814e9938ea9cc179086ff5c0a387) |
---|---|
1/* 2 * pc87427.c - hardware monitoring driver for the 3 * National Semiconductor PC87427 Super-I/O chip 4 * Copyright (C) 2006, 2008, 2010 Jean Delvare <khali@linux-fr.org> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 969 unchanged lines hidden (view full) --- 978 return -EBUSY; 979 } 980 } 981 return 0; 982} 983 984static void pc87427_init_device(struct device *dev) 985{ | 1/* 2 * pc87427.c - hardware monitoring driver for the 3 * National Semiconductor PC87427 Super-I/O chip 4 * Copyright (C) 2006, 2008, 2010 Jean Delvare <khali@linux-fr.org> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 969 unchanged lines hidden (view full) --- 978 return -EBUSY; 979 } 980 } 981 return 0; 982} 983 984static void pc87427_init_device(struct device *dev) 985{ |
986 struct pc87427_sio_data *sio_data = dev->platform_data; | 986 struct pc87427_sio_data *sio_data = dev_get_platdata(dev); |
987 struct pc87427_data *data = dev_get_drvdata(dev); 988 int i; 989 u8 reg; 990 991 /* The FMC module should be ready */ 992 reg = pc87427_read8(data, LD_FAN, PC87427_REG_BANK); 993 if (!(reg & 0x80)) 994 dev_warn(dev, "%s module not ready!\n", "FMC"); --- 75 unchanged lines hidden (view full) --- 1070 if (!(data->temp_enabled & (1 << i))) 1071 continue; 1072 sysfs_remove_group(&dev->kobj, &pc87427_group_temp[i]); 1073 } 1074} 1075 1076static int pc87427_probe(struct platform_device *pdev) 1077{ | 987 struct pc87427_data *data = dev_get_drvdata(dev); 988 int i; 989 u8 reg; 990 991 /* The FMC module should be ready */ 992 reg = pc87427_read8(data, LD_FAN, PC87427_REG_BANK); 993 if (!(reg & 0x80)) 994 dev_warn(dev, "%s module not ready!\n", "FMC"); --- 75 unchanged lines hidden (view full) --- 1070 if (!(data->temp_enabled & (1 << i))) 1071 continue; 1072 sysfs_remove_group(&dev->kobj, &pc87427_group_temp[i]); 1073 } 1074} 1075 1076static int pc87427_probe(struct platform_device *pdev) 1077{ |
1078 struct pc87427_sio_data *sio_data = pdev->dev.platform_data; | 1078 struct pc87427_sio_data *sio_data = dev_get_platdata(&pdev->dev); |
1079 struct pc87427_data *data; 1080 int i, err, res_count; 1081 1082 data = devm_kzalloc(&pdev->dev, sizeof(struct pc87427_data), 1083 GFP_KERNEL); 1084 if (!data) { 1085 pr_err("Out of memory\n"); 1086 return -ENOMEM; --- 269 unchanged lines hidden --- | 1079 struct pc87427_data *data; 1080 int i, err, res_count; 1081 1082 data = devm_kzalloc(&pdev->dev, sizeof(struct pc87427_data), 1083 GFP_KERNEL); 1084 if (!data) { 1085 pr_err("Out of memory\n"); 1086 return -ENOMEM; --- 269 unchanged lines hidden --- |