Lines 192-197
msi_bus_store(struct device *dev, struct
Link Here
|
192 |
return count; |
192 |
return count; |
193 |
} |
193 |
} |
194 |
|
194 |
|
|
|
195 |
static ssize_t |
196 |
suspend_store(struct device *dev, struct device_attribute *attr, |
197 |
const char *buf, size_t count) |
198 |
{ |
199 |
int rc; |
200 |
|
201 |
if (*buf == '1') |
202 |
rc = dev->bus->suspend(dev, PMSG_SUSPEND); |
203 |
else if (*buf == '0') |
204 |
rc = dev->bus->resume(dev); |
205 |
else |
206 |
rc = -EIO; |
207 |
return (rc < 0 ? rc : count); |
208 |
} |
209 |
|
195 |
struct device_attribute pci_dev_attrs[] = { |
210 |
struct device_attribute pci_dev_attrs[] = { |
196 |
__ATTR_RO(resource), |
211 |
__ATTR_RO(resource), |
197 |
__ATTR_RO(vendor), |
212 |
__ATTR_RO(vendor), |
Lines 209-214
struct device_attribute pci_dev_attrs[]
Link Here
|
209 |
__ATTR(broken_parity_status,(S_IRUGO|S_IWUSR), |
224 |
__ATTR(broken_parity_status,(S_IRUGO|S_IWUSR), |
210 |
broken_parity_status_show,broken_parity_status_store), |
225 |
broken_parity_status_show,broken_parity_status_store), |
211 |
__ATTR(msi_bus, 0644, msi_bus_show, msi_bus_store), |
226 |
__ATTR(msi_bus, 0644, msi_bus_show, msi_bus_store), |
|
|
227 |
__ATTR(suspend, 0200, NULL, suspend_store), |
212 |
__ATTR_NULL, |
228 |
__ATTR_NULL, |
213 |
}; |
229 |
}; |
214 |
|
230 |
|