--- zzzz-none-000/linux-3.10.107/drivers/hwmon/w83627hf.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/hwmon/w83627hf.c 2021-02-04 17:41:59.000000000 +0000 @@ -5,7 +5,7 @@ * Philip Edelbrock , * and Mark Studebaker * Ported to 2.6 by Bernhard C. Schrenk - * Copyright (c) 2007 - 1012 Jean Delvare + * Copyright (c) 2007 - 1012 Jean Delvare * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -474,7 +474,6 @@ static struct platform_driver w83627hf_driver = { .driver = { - .owner = THIS_MODULE, .name = DRVNAME, .pm = W83627HF_DEV_PM_OPS, }, @@ -820,6 +819,9 @@ err = kstrtoul(buf, 10, &val); if (err) return err; + + if (val > 255) + return -EINVAL; data->vrm = val; return count; @@ -1415,7 +1417,7 @@ static int w83627hf_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct w83627hf_sio_data *sio_data = dev->platform_data; + struct w83627hf_sio_data *sio_data = dev_get_platdata(dev); struct w83627hf_data *data; struct resource *res; int err, i; @@ -1636,7 +1638,7 @@ static int w83627thf_read_gpio5(struct platform_device *pdev) { - struct w83627hf_sio_data *sio_data = pdev->dev.platform_data; + struct w83627hf_sio_data *sio_data = dev_get_platdata(&pdev->dev); int res = 0xff, sel; superio_enter(sio_data); @@ -1669,7 +1671,7 @@ static int w83687thf_read_vid(struct platform_device *pdev) { - struct w83627hf_sio_data *sio_data = pdev->dev.platform_data; + struct w83627hf_sio_data *sio_data = dev_get_platdata(&pdev->dev); int res = 0xff; superio_enter(sio_data);