max197.c (bf61c8840efe60fd8f91446860b63338fb424158) | max197.c (a8b3a3a53f9a814e9938ea9cc179086ff5c0a387) |
---|---|
1/* 2 * Maxim MAX197 A/D Converter driver 3 * 4 * Copyright (c) 2012 Savoir-faire Linux Inc. 5 * Vivien Didelot <vivien.didelot@savoirfairelinux.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 247 unchanged lines hidden (view full) --- 256 NULL 257 }, 258}; 259 260static int max197_probe(struct platform_device *pdev) 261{ 262 int ch, ret; 263 struct max197_data *data; | 1/* 2 * Maxim MAX197 A/D Converter driver 3 * 4 * Copyright (c) 2012 Savoir-faire Linux Inc. 5 * Vivien Didelot <vivien.didelot@savoirfairelinux.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 247 unchanged lines hidden (view full) --- 256 NULL 257 }, 258}; 259 260static int max197_probe(struct platform_device *pdev) 261{ 262 int ch, ret; 263 struct max197_data *data; |
264 struct max197_platform_data *pdata = pdev->dev.platform_data; | 264 struct max197_platform_data *pdata = dev_get_platdata(&pdev->dev); |
265 enum max197_chips chip = platform_get_device_id(pdev)->driver_data; 266 267 if (pdata == NULL) { 268 dev_err(&pdev->dev, "no platform data supplied\n"); 269 return -EINVAL; 270 } 271 272 if (pdata->convert == NULL) { --- 77 unchanged lines hidden --- | 265 enum max197_chips chip = platform_get_device_id(pdev)->driver_data; 266 267 if (pdata == NULL) { 268 dev_err(&pdev->dev, "no platform data supplied\n"); 269 return -EINVAL; 270 } 271 272 if (pdata->convert == NULL) { --- 77 unchanged lines hidden --- |