Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mei: drop unused hw dependent fw status functions

We introduced unified FW status function in patch
mei: add per device configuration (lkml.org/lkml/2014/5/12/607)

This change made hw_ops functions unused and obsolete
therefore we remove these functions from source code.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alexander Usyskin and committed by
Greg Kroah-Hartman
8f642155 4734e390

-89
-54
drivers/misc/mei/hw-me.c
··· 710 710 return IRQ_HANDLED; 711 711 } 712 712 713 - /** 714 - * mei_me_fw_status - retrieve fw status from the pci config space 715 - * 716 - * @dev: the device structure 717 - * @fw_status: fw status registers storage 718 - * 719 - * returns 0 on success an error code otherwise 720 - */ 721 - static int mei_me_fw_status(struct mei_device *dev, 722 - struct mei_fw_status *fw_status) 723 - { 724 - const u32 pci_cfg_reg[] = {PCI_CFG_HFS_1, PCI_CFG_HFS_2}; 725 - int i; 726 - 727 - if (!fw_status) 728 - return -EINVAL; 729 - 730 - switch (dev->pdev->device) { 731 - case MEI_DEV_ID_IBXPK_1: 732 - case MEI_DEV_ID_IBXPK_2: 733 - case MEI_DEV_ID_CPT_1: 734 - case MEI_DEV_ID_PBG_1: 735 - case MEI_DEV_ID_PPT_1: 736 - case MEI_DEV_ID_PPT_2: 737 - case MEI_DEV_ID_PPT_3: 738 - case MEI_DEV_ID_LPT_H: 739 - case MEI_DEV_ID_LPT_W: 740 - case MEI_DEV_ID_LPT_LP: 741 - case MEI_DEV_ID_LPT_HR: 742 - case MEI_DEV_ID_WPT_LP: 743 - fw_status->count = 2; 744 - break; 745 - case MEI_DEV_ID_ICH10_1: 746 - case MEI_DEV_ID_ICH10_2: 747 - case MEI_DEV_ID_ICH10_3: 748 - case MEI_DEV_ID_ICH10_4: 749 - fw_status->count = 1; 750 - break; 751 - default: 752 - fw_status->count = 0; 753 - break; 754 - } 755 - 756 - for (i = 0; i < fw_status->count && i < MEI_FW_STATUS_MAX; i++) { 757 - int ret; 758 - ret = pci_read_config_dword(dev->pdev, 759 - pci_cfg_reg[i], &fw_status->status[i]); 760 - if (ret) 761 - return ret; 762 - } 763 - return 0; 764 - } 765 - 766 713 static const struct mei_hw_ops mei_me_hw_ops = { 767 714 768 715 .pg_state = mei_me_pg_state, 769 716 770 - .fw_status = mei_me_fw_status, 771 717 .host_is_ready = mei_me_host_is_ready, 772 718 773 719 .hw_is_ready = mei_me_hw_is_ready,
-32
drivers/misc/mei/hw-txe.c
··· 1042 1042 return IRQ_HANDLED; 1043 1043 } 1044 1044 1045 - 1046 - /** 1047 - * mei_txe_fw_status - retrieve fw status from the pci config space 1048 - * 1049 - * @dev: the device structure 1050 - * @fw_status: fw status registers storage 1051 - * 1052 - * returns: 0 on success an error code otherwise 1053 - */ 1054 - static int mei_txe_fw_status(struct mei_device *dev, 1055 - struct mei_fw_status *fw_status) 1056 - { 1057 - const u32 pci_cfg_reg[] = {PCI_CFG_TXE_FW_STS0, PCI_CFG_TXE_FW_STS1}; 1058 - int i; 1059 - 1060 - if (!fw_status) 1061 - return -EINVAL; 1062 - 1063 - fw_status->count = 2; 1064 - 1065 - for (i = 0; i < fw_status->count && i < MEI_FW_STATUS_MAX; i++) { 1066 - int ret; 1067 - ret = pci_read_config_dword(dev->pdev, 1068 - pci_cfg_reg[i], &fw_status->status[i]); 1069 - if (ret) 1070 - return ret; 1071 - } 1072 - 1073 - return 0; 1074 - } 1075 - 1076 1045 static const struct mei_hw_ops mei_txe_hw_ops = { 1077 1046 1078 - .fw_status = mei_txe_fw_status, 1079 1047 .host_is_ready = mei_txe_host_is_ready, 1080 1048 1081 1049 .pg_state = mei_txe_pg_state,
-3
drivers/misc/mei/mei_dev.h
··· 227 227 228 228 /** struct mei_hw_ops 229 229 * 230 - * @fw_status - read FW status from PCI config space 231 230 * @host_is_ready - query for host readiness 232 231 233 232 * @hw_is_ready - query if hw is ready ··· 254 255 */ 255 256 struct mei_hw_ops { 256 257 257 - int (*fw_status)(struct mei_device *dev, 258 - struct mei_fw_status *fw_status); 259 258 bool (*host_is_ready)(struct mei_device *dev); 260 259 261 260 bool (*hw_is_ready)(struct mei_device *dev);