aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/virtpci
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-15 11:30:39 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-15 11:30:39 -0800
commit46f7b635569731ff81a3b72d1bcd4415b293b637 (patch)
treee97e5e28d1768bb281116d92292851758ea20024 /drivers/staging/unisys/virtpci
parentMerge tag 'driver-core-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core (diff)
parentstaging: lustre: lustre: libcfs: define symbols as static (diff)
downloadlinux-dev-46f7b635569731ff81a3b72d1bcd4415b293b637.tar.xz
linux-dev-46f7b635569731ff81a3b72d1bcd4415b293b637.zip
Merge tag 'staging-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging drivers patches from Greg KH: "Here's the big staging driver tree update for 3.20-rc1. Lots of little things in here, adding up to lots of overall cleanups. The IIO driver updates are also in here as they cross the staging tree boundry a lot. I2O has moved into staging as well, as a plan to drop it from the tree eventually as that's a dead subsystem. All of this has been in linux-next with no reported issues for a while" * tag 'staging-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (740 commits) staging: lustre: lustre: libcfs: define symbols as static staging: rtl8712: Do coding style cleanup staging: lustre: make obd_updatemax_lock static staging: rtl8188eu: core: switch with redundant cases staging: rtl8188eu: odm: conditional setting with no effect staging: rtl8188eu: odm: condition with no effect staging: ft1000: fix braces warning staging: sm7xxfb: fix remaining CamelCase staging: sm7xxfb: fix CamelCase staging: rtl8723au: multiple condition with no effect - if identical to else staging: sm7xxfb: make smtc_scr_info static staging/lustre/mdc: Initialize req in mdc_enqueue for !it case staging/lustre/clio: Do not allow group locks with gid 0 staging/lustre/llite: don't add to page cache upon failure staging/lustre/llite: Add exception entry check after radix_tree staging/lustre/libcfs: protect kkuc_groups from write access staging/lustre/fld: refer to MDT0 for fld lookup in some cases staging/lustre/llite: Solve a race to access lli_has_smd in read case staging/lustre/ptlrpc: hold rq_lock when modify rq_flags staging/lustre/lnet: portal spreading rotor should be unsigned ...
Diffstat (limited to 'drivers/staging/unisys/virtpci')
-rw-r--r--drivers/staging/unisys/virtpci/virtpci.c61
1 files changed, 17 insertions, 44 deletions
diff --git a/drivers/staging/unisys/virtpci/virtpci.c b/drivers/staging/unisys/virtpci/virtpci.c
index 39b828dce503..8fdfd6f3605f 100644
--- a/drivers/staging/unisys/virtpci/virtpci.c
+++ b/drivers/staging/unisys/virtpci/virtpci.c
@@ -104,8 +104,6 @@ static ssize_t virtpci_driver_attr_store(struct kobject *kobj,
const char *buf, size_t count);
static int virtpci_bus_match(struct device *dev, struct device_driver *drv);
static int virtpci_uevent(struct device *dev, struct kobj_uevent_env *env);
-static int virtpci_device_suspend(struct device *dev, pm_message_t state);
-static int virtpci_device_resume(struct device *dev);
static int virtpci_device_probe(struct device *dev);
static int virtpci_device_remove(struct device *dev);
@@ -128,8 +126,6 @@ static struct bus_type virtpci_bus_type = {
.name = "uisvirtpci",
.match = virtpci_bus_match,
.uevent = virtpci_uevent,
- .suspend = virtpci_device_suspend,
- .resume = virtpci_device_resume,
};
static struct device virtpci_rootbus_device = {
@@ -279,9 +275,9 @@ static int add_vbus(struct add_vbus_guestpart *addparams)
POSTCODE_LINUX_2(VPCI_CREATE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
return 0;
}
- write_vbus_chp_info(vbus->platform_data /* chanptr */ ,
+ write_vbus_chp_info(vbus->platform_data /* chanptr */,
&chipset_driver_info);
- write_vbus_bus_info(vbus->platform_data /* chanptr */ ,
+ write_vbus_bus_info(vbus->platform_data /* chanptr */,
&bus_driver_info);
LOGINF("Added vbus %d; device %s created successfully\n",
addparams->bus_no, BUS_ID(vbus));
@@ -466,7 +462,7 @@ static int pause_vhba(struct pause_virt_guestpart *pauseparams)
GET_SCSIADAPINFO_FROM_CHANPTR(pauseparams->chanptr);
LOGINF("Pausing vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1, scsi.wwnn.wwnn2);
- i = virtpci_device_serverdown(NULL /*no parent bus */ , VIRTHBA_TYPE,
+ i = virtpci_device_serverdown(NULL /*no parent bus */, VIRTHBA_TYPE,
&scsi.wwnn, NULL);
if (i)
LOGINF("Paused vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1,
@@ -487,7 +483,7 @@ static int pause_vnic(struct pause_virt_guestpart *pauseparams)
LOGINF("Pausing vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
- i = virtpci_device_serverdown(NULL /*no parent bus */ , VIRTNIC_TYPE,
+ i = virtpci_device_serverdown(NULL /*no parent bus */, VIRTNIC_TYPE,
NULL, net.mac_addr);
if (i) {
LOGINF(" Paused vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
@@ -508,7 +504,7 @@ static int resume_vhba(struct resume_virt_guestpart *resumeparams)
GET_SCSIADAPINFO_FROM_CHANPTR(resumeparams->chanptr);
LOGINF("Resuming vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1, scsi.wwnn.wwnn2);
- i = virtpci_device_serverup(NULL /*no parent bus */ , VIRTHBA_TYPE,
+ i = virtpci_device_serverup(NULL /*no parent bus */, VIRTHBA_TYPE,
&scsi.wwnn, NULL);
if (i)
LOGINF("Resumed vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1,
@@ -530,7 +526,7 @@ resume_vnic(struct resume_virt_guestpart *resumeparams)
LOGINF("Resuming vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
- i = virtpci_device_serverup(NULL /*no parent bus */ , VIRTNIC_TYPE,
+ i = virtpci_device_serverup(NULL /*no parent bus */, VIRTNIC_TYPE,
NULL, net.mac_addr);
if (i) {
LOGINF(" Resumed vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
@@ -551,7 +547,7 @@ static int delete_vhba(struct del_virt_guestpart *delparams)
GET_SCSIADAPINFO_FROM_CHANPTR(delparams->chanptr);
LOGINF("Deleting vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1, scsi.wwnn.wwnn2);
- i = virtpci_device_del(NULL /*no parent bus */ , VIRTHBA_TYPE,
+ i = virtpci_device_del(NULL /*no parent bus */, VIRTHBA_TYPE,
&scsi.wwnn, NULL);
if (i) {
LOGINF("Deleted vhba wwnn:%x:%x\n", scsi.wwnn.wwnn1,
@@ -574,7 +570,7 @@ static int delete_vnic(struct del_virt_guestpart *delparams)
LOGINF("Deleting vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
net.mac_addr[0], net.mac_addr[1], net.mac_addr[2],
net.mac_addr[3], net.mac_addr[4], net.mac_addr[5]);
- i = virtpci_device_del(NULL /*no parent bus */ , VIRTNIC_TYPE, NULL,
+ i = virtpci_device_del(NULL /*no parent bus */, VIRTNIC_TYPE, NULL,
net.mac_addr);
if (i) {
LOGINF("Deleted vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
@@ -757,18 +753,6 @@ static int virtpci_uevent(struct device *dev, struct kobj_uevent_env *env)
return 0;
}
-static int virtpci_device_suspend(struct device *dev, pm_message_t state)
-{
- DBGINF("In virtpci_device_suspend -NYI ****\n");
- return 0;
-}
-
-static int virtpci_device_resume(struct device *dev)
-{
- DBGINF("In virtpci_device_resume -NYI ****\n");
- return 0;
-}
-
/* For a child device just created on a client bus, fill in
* information about the driver that is controlling this device into
* the appropriate slot within the vbus channel of the bus
@@ -1338,18 +1322,13 @@ static ssize_t virtpci_driver_attr_show(struct kobject *kobj,
ssize_t ret = 0;
struct driver_private *dprivate = to_driver(kobj);
- struct device_driver *driver;
+ struct device_driver *driver = dprivate->driver;
- if (dprivate != NULL)
- driver = dprivate->driver;
- else
- driver = NULL;
+ DBGINF("In virtpci_driver_attr_show driver->name:%s\n", driver->name);
+
+ if (dattr->show)
+ ret = dattr->show(driver, buf);
- DBGINF("In virtpci_driver_attr_show driver->name:%s\n", driver->name);
- if (driver) {
- if (dattr->show)
- ret = dattr->show(driver, buf);
- }
return ret;
}
@@ -1361,19 +1340,13 @@ static ssize_t virtpci_driver_attr_store(struct kobject *kobj,
ssize_t ret = 0;
struct driver_private *dprivate = to_driver(kobj);
- struct device_driver *driver;
-
- if (dprivate != NULL)
- driver = dprivate->driver;
- else
- driver = NULL;
+ struct device_driver *driver = dprivate->driver;
DBGINF("In virtpci_driver_attr_store driver->name:%s\n", driver->name);
- if (driver) {
- if (dattr->store)
- ret = dattr->store(driver, buf, count);
- }
+ if (dattr->store)
+ ret = dattr->store(driver, buf, count);
+
return ret;
}