--- zzzz-none-000/linux-3.10.107/drivers/hwmon/pc87427.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/hwmon/pc87427.c 2021-02-04 17:41:59.000000000 +0000 @@ -1,7 +1,7 @@ /* * pc87427.c - hardware monitoring driver for the * National Semiconductor PC87427 Super-I/O chip - * Copyright (C) 2006, 2008, 2010 Jean Delvare + * Copyright (C) 2006, 2008, 2010 Jean Delvare * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -983,7 +983,7 @@ static void pc87427_init_device(struct device *dev) { - struct pc87427_sio_data *sio_data = dev->platform_data; + struct pc87427_sio_data *sio_data = dev_get_platdata(dev); struct pc87427_data *data = dev_get_drvdata(dev); int i; u8 reg; @@ -1075,16 +1075,14 @@ static int pc87427_probe(struct platform_device *pdev) { - struct pc87427_sio_data *sio_data = pdev->dev.platform_data; + struct pc87427_sio_data *sio_data = dev_get_platdata(&pdev->dev); struct pc87427_data *data; int i, err, res_count; data = devm_kzalloc(&pdev->dev, sizeof(struct pc87427_data), GFP_KERNEL); - if (!data) { - pr_err("Out of memory\n"); + if (!data) return -ENOMEM; - } data->address[0] = sio_data->address[0]; data->address[1] = sio_data->address[1]; @@ -1155,7 +1153,6 @@ static struct platform_driver pc87427_driver = { .driver = { - .owner = THIS_MODULE, .name = DRVNAME, }, .probe = pc87427_probe, @@ -1347,7 +1344,7 @@ platform_driver_unregister(&pc87427_driver); } -MODULE_AUTHOR("Jean Delvare "); +MODULE_AUTHOR("Jean Delvare "); MODULE_DESCRIPTION("PC87427 hardware monitoring driver"); MODULE_LICENSE("GPL");