diff options
Diffstat (limited to 'drivers/misc')
| -rw-r--r-- | drivers/misc/eeprom/max6875.c | 29 | ||||
| -rw-r--r-- | drivers/misc/phantom.c | 2 | ||||
| -rw-r--r-- | drivers/misc/sgi-gru/grufile.c | 3 |
3 files changed, 7 insertions, 27 deletions
diff --git a/drivers/misc/eeprom/max6875.c b/drivers/misc/eeprom/max6875.c index 3c0c58eed347..5a6b2bce8ad5 100644 --- a/drivers/misc/eeprom/max6875.c +++ b/drivers/misc/eeprom/max6875.c | |||
| @@ -33,12 +33,6 @@ | |||
| 33 | #include <linux/i2c.h> | 33 | #include <linux/i2c.h> |
| 34 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> |
| 35 | 35 | ||
| 36 | /* Do not scan - the MAX6875 access method will write to some EEPROM chips */ | ||
| 37 | static const unsigned short normal_i2c[] = { I2C_CLIENT_END }; | ||
| 38 | |||
| 39 | /* Insmod parameters */ | ||
| 40 | I2C_CLIENT_INSMOD_1(max6875); | ||
| 41 | |||
| 42 | /* The MAX6875 can only read/write 16 bytes at a time */ | 36 | /* The MAX6875 can only read/write 16 bytes at a time */ |
| 43 | #define SLICE_SIZE 16 | 37 | #define SLICE_SIZE 16 |
| 44 | #define SLICE_BITS 4 | 38 | #define SLICE_BITS 4 |
| @@ -146,31 +140,21 @@ static struct bin_attribute user_eeprom_attr = { | |||
| 146 | .read = max6875_read, | 140 | .read = max6875_read, |
| 147 | }; | 141 | }; |
| 148 | 142 | ||
| 149 | /* Return 0 if detection is successful, -ENODEV otherwise */ | 143 | static int max6875_probe(struct i2c_client *client, |
| 150 | static int max6875_detect(struct i2c_client *client, int kind, | 144 | const struct i2c_device_id *id) |
| 151 | struct i2c_board_info *info) | ||
| 152 | { | 145 | { |
| 153 | struct i2c_adapter *adapter = client->adapter; | 146 | struct i2c_adapter *adapter = client->adapter; |
| 147 | struct max6875_data *data; | ||
| 148 | int err; | ||
| 154 | 149 | ||
| 155 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_BYTE_DATA | 150 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_BYTE_DATA |
| 156 | | I2C_FUNC_SMBUS_READ_BYTE)) | 151 | | I2C_FUNC_SMBUS_READ_BYTE)) |
| 157 | return -ENODEV; | 152 | return -ENODEV; |
| 158 | 153 | ||
| 159 | /* Only check even addresses */ | 154 | /* Only bind to even addresses */ |
| 160 | if (client->addr & 1) | 155 | if (client->addr & 1) |
| 161 | return -ENODEV; | 156 | return -ENODEV; |
| 162 | 157 | ||
| 163 | strlcpy(info->type, "max6875", I2C_NAME_SIZE); | ||
| 164 | |||
| 165 | return 0; | ||
| 166 | } | ||
| 167 | |||
| 168 | static int max6875_probe(struct i2c_client *client, | ||
| 169 | const struct i2c_device_id *id) | ||
| 170 | { | ||
| 171 | struct max6875_data *data; | ||
| 172 | int err; | ||
| 173 | |||
| 174 | if (!(data = kzalloc(sizeof(struct max6875_data), GFP_KERNEL))) | 158 | if (!(data = kzalloc(sizeof(struct max6875_data), GFP_KERNEL))) |
| 175 | return -ENOMEM; | 159 | return -ENOMEM; |
| 176 | 160 | ||
| @@ -222,9 +206,6 @@ static struct i2c_driver max6875_driver = { | |||
| 222 | .probe = max6875_probe, | 206 | .probe = max6875_probe, |
| 223 | .remove = max6875_remove, | 207 | .remove = max6875_remove, |
| 224 | .id_table = max6875_id, | 208 | .id_table = max6875_id, |
| 225 | |||
| 226 | .detect = max6875_detect, | ||
| 227 | .address_data = &addr_data, | ||
| 228 | }; | 209 | }; |
| 229 | 210 | ||
| 230 | static int __init max6875_init(void) | 211 | static int __init max6875_init(void) |
diff --git a/drivers/misc/phantom.c b/drivers/misc/phantom.c index fa57b67593ae..90a95ce8dc34 100644 --- a/drivers/misc/phantom.c +++ b/drivers/misc/phantom.c | |||
| @@ -271,7 +271,7 @@ static unsigned int phantom_poll(struct file *file, poll_table *wait) | |||
| 271 | return mask; | 271 | return mask; |
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | static struct file_operations phantom_file_ops = { | 274 | static const struct file_operations phantom_file_ops = { |
| 275 | .open = phantom_open, | 275 | .open = phantom_open, |
| 276 | .release = phantom_release, | 276 | .release = phantom_release, |
| 277 | .unlocked_ioctl = phantom_ioctl, | 277 | .unlocked_ioctl = phantom_ioctl, |
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c index 300e7ba391a0..41c8fe2a928c 100644 --- a/drivers/misc/sgi-gru/grufile.c +++ b/drivers/misc/sgi-gru/grufile.c | |||
| @@ -53,7 +53,6 @@ struct gru_stats_s gru_stats; | |||
| 53 | /* Guaranteed user available resources on each node */ | 53 | /* Guaranteed user available resources on each node */ |
| 54 | static int max_user_cbrs, max_user_dsr_bytes; | 54 | static int max_user_cbrs, max_user_dsr_bytes; |
| 55 | 55 | ||
| 56 | static struct file_operations gru_fops; | ||
| 57 | static struct miscdevice gru_miscdev; | 56 | static struct miscdevice gru_miscdev; |
| 58 | 57 | ||
| 59 | 58 | ||
| @@ -426,7 +425,7 @@ static void __exit gru_exit(void) | |||
| 426 | gru_proc_exit(); | 425 | gru_proc_exit(); |
| 427 | } | 426 | } |
| 428 | 427 | ||
| 429 | static struct file_operations gru_fops = { | 428 | static const struct file_operations gru_fops = { |
| 430 | .owner = THIS_MODULE, | 429 | .owner = THIS_MODULE, |
| 431 | .unlocked_ioctl = gru_file_unlocked_ioctl, | 430 | .unlocked_ioctl = gru_file_unlocked_ioctl, |
| 432 | .mmap = gru_file_mmap, | 431 | .mmap = gru_file_mmap, |
