[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5293FEFA.4000700@broadcom.com>
Date: Mon, 25 Nov 2013 17:52:58 -0800
From: "Nithin Nayak Sujir" <nsujir@...adcom.com>
To: "Guenter Roeck" <linux@...ck-us.net>, netdev@...r.kernel.org
cc: "David S. Miller" <davem@...emloft.net>,
"Jeff Kirsher" <jeffrey.t.kirsher@...el.com>,
"Jesse Brandeburg" <jesse.brandeburg@...el.com>,
"Bruce Allan" <bruce.w.allan@...el.com>,
"Carolyn Wyborny" <carolyn.wyborny@...el.com>,
"Don Skidmore" <donald.c.skidmore@...el.com>,
"Greg Rose" <gregory.v.rose@...el.com>,
"Michael Chan" <mchan@...adcom.com>,
e1000-devel@...ts.sourceforge.net, lm-sensors@...sensors.org
Subject: Re: [PATCH 1/5] tg3: Convert to use
hwmon_device_register_with_groups
On 11/22/2013 10:07 PM, Guenter Roeck wrote:
> Use new hwmon API to simplify code, provide missing mandatory 'name'
> sysfs attribute, and attach hwmon attributes to hwmon device instead
> of pci device.
>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
> ---
> drivers/net/ethernet/broadcom/tg3.c | 25 ++++++-------------------
> 1 file changed, 6 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index a9e0684..369b736 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -10629,10 +10629,8 @@ static void tg3_sd_scan_scratchpad(struct tg3 *tp, struct tg3_ocir *ocir)
> static ssize_t tg3_show_temp(struct device *dev,
> struct device_attribute *devattr, char *buf)
> {
> - struct pci_dev *pdev = to_pci_dev(dev);
> - struct net_device *netdev = pci_get_drvdata(pdev);
> - struct tg3 *tp = netdev_priv(netdev);
> struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
> + struct tg3 *tp = dev_get_drvdata(dev);
Shouldn't this be
struct tg3 *tp = netdev_priv(dev_get_drvdata(dev));
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists