| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * timberdale.c timberdale FPGA MFD driver |
|---|
| 3 | 4 | * Copyright (c) 2009 Intel Corporation |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 7 | | - * published by the Free Software Foundation. |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 12 | | - * GNU General Public License for more details. |
|---|
| 13 | | - * |
|---|
| 14 | | - * You should have received a copy of the GNU General Public License |
|---|
| 15 | | - * along with this program; if not, write to the Free Software |
|---|
| 16 | | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|---|
| 17 | 5 | */ |
|---|
| 18 | 6 | |
|---|
| 19 | 7 | /* Supports: |
|---|
| .. | .. |
|---|
| 638 | 626 | static ssize_t show_fw_ver(struct device *dev, struct device_attribute *attr, |
|---|
| 639 | 627 | char *buf) |
|---|
| 640 | 628 | { |
|---|
| 641 | | - struct pci_dev *pdev = to_pci_dev(dev); |
|---|
| 642 | | - struct timberdale_device *priv = pci_get_drvdata(pdev); |
|---|
| 629 | + struct timberdale_device *priv = dev_get_drvdata(dev); |
|---|
| 643 | 630 | |
|---|
| 644 | 631 | return sprintf(buf, "%d.%d.%d\n", priv->fw.major, priv->fw.minor, |
|---|
| 645 | 632 | priv->fw.config); |
|---|