本文整理汇总了C++中put_device函数的典型用法代码示例。如果您正苦于以下问题:C++ put_device函数的具体用法?C++ put_device怎么用?C++ put_device使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了put_device函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: omap_dss_put_device
void omap_dss_put_device(struct omap_dss_device *dssdev)
{
put_device(&dssdev->dev);
}
开发者ID:CelticWebSolutions,项目名称:Android-Kernel-2.6.35-Nook-Tablet,代码行数:4,代码来源:display.c
示例2: read_domain_devices
static int read_domain_devices(struct acpi_power_meter_resource *resource)
{
int res = 0;
int i;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
union acpi_object *pss;
acpi_status status;
status = acpi_evaluate_object(resource->acpi_dev->handle, "_PMD", NULL,
&buffer);
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PMD"));
return -ENODEV;
}
pss = buffer.pointer;
if (!pss ||
pss->type != ACPI_TYPE_PACKAGE) {
dev_err(&resource->acpi_dev->dev, ACPI_POWER_METER_NAME
"Invalid _PMD data\n");
res = -EFAULT;
goto end;
}
if (!pss->package.count)
goto end;
resource->domain_devices = kzalloc(sizeof(struct acpi_device *) *
pss->package.count, GFP_KERNEL);
if (!resource->domain_devices) {
res = -ENOMEM;
goto end;
}
resource->holders_dir = kobject_create_and_add("measures",
&resource->acpi_dev->dev.kobj);
if (!resource->holders_dir) {
res = -ENOMEM;
goto exit_free;
}
resource->num_domain_devices = pss->package.count;
for (i = 0; i < pss->package.count; i++) {
struct acpi_device *obj;
union acpi_object *element = &(pss->package.elements[i]);
/* Refuse non-references */
if (element->type != ACPI_TYPE_LOCAL_REFERENCE)
continue;
/* Create a symlink to domain objects */
resource->domain_devices[i] = NULL;
status = acpi_bus_get_device(element->reference.handle,
&resource->domain_devices[i]);
if (ACPI_FAILURE(status))
continue;
obj = resource->domain_devices[i];
get_device(&obj->dev);
res = sysfs_create_link(resource->holders_dir, &obj->dev.kobj,
kobject_name(&obj->dev.kobj));
if (res) {
put_device(&obj->dev);
resource->domain_devices[i] = NULL;
}
}
res = 0;
goto end;
exit_free:
kfree(resource->domain_devices);
end:
kfree(buffer.pointer);
return res;
}
开发者ID:laudarch,项目名称:simcom-linux-kernel,代码行数:78,代码来源:power_meter.c
示例3: __afu_open
static int __afu_open(struct inode *inode, struct file *file, bool master)
{
struct cxl *adapter;
struct cxl_afu *afu;
struct cxl_context *ctx;
int adapter_num = CXL_DEVT_ADAPTER(inode->i_rdev);
int slice = CXL_DEVT_AFU(inode->i_rdev);
int rc = -ENODEV;
pr_devel("afu_open afu%i.%i\n", slice, adapter_num);
if (!(adapter = get_cxl_adapter(adapter_num)))
return -ENODEV;
if (slice > adapter->slices)
goto err_put_adapter;
spin_lock(&adapter->afu_list_lock);
if (!(afu = adapter->afu[slice])) {
spin_unlock(&adapter->afu_list_lock);
goto err_put_adapter;
}
/*
* taking a ref to the afu so that it doesn't go away
* for rest of the function. This ref is released before
* we return.
*/
cxl_afu_get(afu);
spin_unlock(&adapter->afu_list_lock);
if (!afu->current_mode)
goto err_put_afu;
if (!cxl_ops->link_ok(adapter, afu)) {
rc = -EIO;
goto err_put_afu;
}
if (!(ctx = cxl_context_alloc())) {
rc = -ENOMEM;
goto err_put_afu;
}
rc = cxl_context_init(ctx, afu, master);
if (rc)
goto err_put_afu;
cxl_context_set_mapping(ctx, inode->i_mapping);
pr_devel("afu_open pe: %i\n", ctx->pe);
file->private_data = ctx;
cxl_ctx_get();
/* indicate success */
rc = 0;
err_put_afu:
/* release the ref taken earlier */
cxl_afu_put(afu);
err_put_adapter:
put_device(&adapter->dev);
return rc;
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:64,代码来源:file.c
示例4: simple_dev_put
static void simple_dev_put(struct simple_device *dev)
{
if (dev)
put_device(&dev->device);
}
开发者ID:Jingtian1989,项目名称:simplebus,代码行数:6,代码来源:simple-core.c
示例5: soundbus_dev_put
void soundbus_dev_put(struct soundbus_dev *dev)
{
if (dev)
put_device(&dev->ofdev.dev);
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:5,代码来源:core.c
示例6: mon_init
/******************************************************************************
* module init/exit *
*****************************************************************************/
static int __init mon_init(void)
{
int rc;
if (!MACHINE_IS_VM) {
pr_err("The z/VM *MONITOR record device driver cannot be "
"loaded without z/VM\n");
return -ENODEV;
}
/*
* Register with IUCV and connect to *MONITOR service
*/
rc = iucv_register(&monreader_iucv_handler, 1);
if (rc) {
pr_err("The z/VM *MONITOR record device driver failed to "
"register with IUCV\n");
return rc;
}
rc = driver_register(&monreader_driver);
if (rc)
goto out_iucv;
monreader_device = kzalloc(sizeof(struct device), GFP_KERNEL);
if (!monreader_device) {
rc = -ENOMEM;
goto out_driver;
}
dev_set_name(monreader_device, "monreader-dev");
monreader_device->bus = &iucv_bus;
monreader_device->parent = iucv_root;
monreader_device->driver = &monreader_driver;
monreader_device->release = (void (*)(struct device *))kfree;
rc = device_register(monreader_device);
if (rc) {
put_device(monreader_device);
goto out_driver;
}
rc = segment_type(mon_dcss_name);
if (rc < 0) {
segment_warning(rc, mon_dcss_name);
goto out_device;
}
if (rc != SEG_TYPE_SC) {
pr_err("The specified *MONITOR DCSS %s does not have the "
"required type SC\n", mon_dcss_name);
rc = -EINVAL;
goto out_device;
}
rc = segment_load(mon_dcss_name, SEGMENT_SHARED,
&mon_dcss_start, &mon_dcss_end);
if (rc < 0) {
segment_warning(rc, mon_dcss_name);
rc = -EINVAL;
goto out_device;
}
dcss_mkname(mon_dcss_name, &user_data_connect[8]);
/*
* misc_register() has to be the last action in module_init(), because
* file operations will be available right after this.
*/
rc = misc_register(&mon_dev);
if (rc < 0 )
goto out;
return 0;
out:
segment_unload(mon_dcss_name);
out_device:
device_unregister(monreader_device);
out_driver:
driver_unregister(&monreader_driver);
out_iucv:
iucv_unregister(&monreader_iucv_handler, 1);
return rc;
}
开发者ID:03199618,项目名称:linux,代码行数:83,代码来源:monreader.c
示例7: comedi_clear_hw_dev
static void comedi_clear_hw_dev(struct comedi_device *dev)
{
put_device(dev->hw_dev);
dev->hw_dev = NULL;
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:5,代码来源:drivers.c
示例8: rtc_class_close
void rtc_class_close(struct rtc_device *rtc)
{
module_put(rtc->owner);
put_device(&rtc->dev);
}
开发者ID:avagin,项目名称:linux,代码行数:5,代码来源:interface.c
示例9: video_put
static inline void video_put(struct video_device *vdev)
{
put_device(&vdev->dev);
}
开发者ID:openube,项目名称:android_kernel_sony_c2305,代码行数:4,代码来源:v4l2-dev.c
示例10: omap_dss_put_device
void omap_dss_put_device(struct omap_dss_device *dssdev)
{
put_device(dssdev->dev);
module_put(dssdev->owner);
}
开发者ID:ParrotSec,项目名称:linux-psec,代码行数:5,代码来源:display.c
示例11: cec_put_device
void cec_put_device(struct cec_devnode *devnode)
{
put_device(&devnode->dev);
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:4,代码来源:cec-core.c
示例12: usb_musb_init
void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
{
struct omap_hwmod *oh;
struct omap_device *od;
struct platform_device *pdev;
struct device *dev = NULL;
int bus_id = -1;
const char *oh_name, *name;
struct omap_musb_board_data *board_data;
if (musb_board_data)
board_data = musb_board_data;
else
board_data = &musb_default_board_data;
/*
* REVISIT: This line can be removed once all the platforms using
* musb_core.c have been converted to use use clkdev.
*/
musb_plat.clock = "ick";
musb_plat.board_data = board_data;
musb_plat.power = board_data->power >> 1;
musb_plat.mode = board_data->mode;
musb_plat.extvbus = board_data->extvbus;
if (cpu_is_omap44xx())
omap4430_phy_init(dev); /* power down the phy */
if (cpu_is_omap3517() || cpu_is_omap3505()) {
oh_name = "am35x_otg_hs";
name = "musb-am35x";
} else {
oh_name = "usb_otg_hs";
name = "musb-omap2430";
}
oh = omap_hwmod_lookup(oh_name);
if (!oh) {
pr_err("Could not look up %s\n", oh_name);
return;
}
od = omap_device_build(name, bus_id, oh, &musb_plat,
sizeof(musb_plat), omap_musb_latency,
ARRAY_SIZE(omap_musb_latency), false);
if (IS_ERR(od)) {
pr_err("Could not build omap_device for %s %s\n",
name, oh_name);
return;
}
pdev = &od->pdev;
dev = &pdev->dev;
get_device(dev);
dev->dma_mask = &musb_dmamask;
dev->coherent_dma_mask = musb_dmamask;
put_device(dev);
if (cpu_is_omap44xx())
omap4430_phy_init(dev);
}
开发者ID:0rt,项目名称:mpokang_kernel,代码行数:61,代码来源:usb-musb.c
示例13: usb_musb_init
void __init usb_musb_init(struct omap_musb_board_data *board_data)
{
char oh_name[MAX_OMAP_MUSB_HWMOD_NAME_LEN];
struct omap_hwmod *oh;
struct omap_device *od;
struct platform_device *pdev;
struct device *dev;
int l, bus_id = -1;
struct musb_hdrc_platform_data *pdata;
if (!board_data) {
pr_err("Board data is required for hdrc device register\n");
return;
}
l = snprintf(oh_name, MAX_OMAP_MUSB_HWMOD_NAME_LEN,
"usb_otg_hs");
WARN(l >= MAX_OMAP_MUSB_HWMOD_NAME_LEN,
"String buffer overflow in MUSB device setup\n");
oh = omap_hwmod_lookup(oh_name);
if (!oh) {
pr_err("Could not look up %s\n", oh_name);
} else {
/*
* REVISIT: This line can be removed once all the platforms
* using musb_core.c have been converted to use use clkdev.
*/
musb_plat.clock = "ick";
musb_plat.board_data = board_data;
musb_plat.power = board_data->power >> 1;
musb_plat.mode = board_data->mode;
musb_plat.device_enable = omap_device_enable;
musb_plat.device_idle = omap_device_idle;
musb_plat.enable_wakeup = omap_device_enable_wakeup;
musb_plat.disable_wakeup = omap_device_disable_wakeup;
#ifdef CONFIG_PM
musb_plat.set_min_bus_tput = omap_pm_set_min_bus_tput;
#endif
/*
* Errata 1.166 idle_req/ack is broken in omap3430
* workaround is to disable the autodile bit for omap3430.
*/
if (cpu_is_omap3430() || cpu_is_omap3630())
oh->flags |= HWMOD_NO_OCP_AUTOIDLE;
musb_plat.oh = oh;
oh_p = oh;
pdata = &musb_plat;
od = omap_device_build(name, bus_id, oh, pdata,
sizeof(struct musb_hdrc_platform_data),
omap_musb_latency,
ARRAY_SIZE(omap_musb_latency), false);
if (IS_ERR(od)) {
pr_err("Could not build omap_device for %s %s\n",
name, oh_name);
} else {
pdev = &od->pdev;
dev = &pdev->dev;
get_device(dev);
dev->dma_mask = &musb_dmamask;
dev->coherent_dma_mask = musb_dmamask;
put_device(dev);
}
/*powerdown the phy*/
if (board_data->interface_type == MUSB_INTERFACE_UTMI)
omap_writel(PHY_PD, DIE_ID_REG_BASE + CONTROL_DEV_CONF);
usb_gadget_init();
}
}
开发者ID:Bloodawn,项目名称:lge-kernel-sniper,代码行数:74,代码来源:usb-musb.c
示例14: usb_hcd_fsl_probe
/**
* usb_hcd_fsl_probe - initialize FSL-based HCDs
* @drvier: Driver to be used for this HCD
* @pdev: USB Host Controller being probed
* Context: !in_interrupt()
*
* Allocates basic resources for this USB host controller.
*
*/
static int usb_hcd_fsl_probe(const struct hc_driver *driver,
struct platform_device *pdev)
{
struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
struct usb_hcd *hcd;
struct resource *res;
int irq;
int retval;
pr_debug("initializing FSL-SOC USB Controller\n");
/* Need platform data for setup */
if (!pdata) {
dev_err(&pdev->dev,
"No platform data for %s.\n", pdev->dev.bus_id);
return -ENODEV;
}
retval = fsl_platform_verify(pdev);
if (retval)
return retval;
/*
* do platform specific init: check the clock, grab/config pins, etc.
*/
if (pdata->platform_init && pdata->platform_init(pdev)) {
retval = -ENODEV;
goto err1;
}
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
dev_err(&pdev->dev,
"Found HC with no IRQ. Check %s setup!\n",
pdev->dev.bus_id);
return -ENODEV;
}
irq = res->start;
fsl_platform_set_vbus_power(pdata, 1);
hcd = usb_create_hcd(driver, &pdev->dev, pdev->dev.bus_id);
if (!hcd) {
retval = -ENOMEM;
goto err1;
}
hcd->rsrc_start = pdata->r_start;
hcd->rsrc_len = pdata->r_len;
hcd->regs = pdata->regs;
vdbg("rsrc_start=0x%llx rsrc_len=0x%llx virtual=0x%x\n",
hcd->rsrc_start, hcd->rsrc_len, hcd->regs);
hcd->power_budget = pdata->power_budget;
/* DDD
* the following must be done by this point, otherwise the OTG
* host port doesn't make it thru initializtion.
* ehci_halt(), called by ehci_fsl_setup() returns -ETIMEDOUT
*/
fsl_platform_set_host_mode(hcd);
retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (retval != 0) {
pr_debug("failed with usb_add_hcd\n");
goto err2;
}
#if defined(CONFIG_USB_OTG)
if (pdata->does_otg) {
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
dbg("pdev=0x%p hcd=0x%p ehci=0x%p\n", pdev, hcd, ehci);
ehci->transceiver = otg_get_transceiver();
dbg("ehci->transceiver=0x%p\n", ehci->transceiver);
if (ehci->transceiver) {
retval = otg_set_host(ehci->transceiver,
&ehci_to_hcd(ehci)->self);
if (retval) {
if (ehci->transceiver)
put_device(ehci->transceiver->dev);
goto err2;
}
} else {
printk(KERN_ERR "can't find transceiver\n");
retval = -ENODEV;
goto err2;
}
}
#endif
//.........这里部分代码省略.........
开发者ID:mrtos,项目名称:Logitech-Revue,代码行数:101,代码来源:ehci-arc.c
示例15: usb_put_transceiver
/**
* usb_put_transceiver - release the (single) USB transceiver
* @x: the transceiver returned by usb_get_transceiver()
*
* Releases a refcount the caller received from usb_get_transceiver().
*
* For use by USB host and peripheral drivers.
*/
void usb_put_transceiver(struct usb_phy *x)
{
if (x)
put_device(x->dev);
}
开发者ID:404992361,项目名称:mi1_kernel,代码行数:13,代码来源:otg.c
示例16: cc2520_spi_add_to_bus
static int cc2520_spi_add_to_bus(void)
{
struct spi_master *spi_master;
struct spi_device *spi_device;
struct device *pdev;
char buff[64];
int status = 0;
spi_master = spi_busnum_to_master(SPI_BUS);
if (!spi_master) {
ERR((KERN_ALERT "[cc2520] - spi_busnum_to_master(%d) returned NULL\n",
SPI_BUS));
ERR((KERN_ALERT "[cc2520] - Missing modprobe spi-bcm2708?\n"));
return -1;
}
spi_device = spi_alloc_device(spi_master);
if (!spi_device) {
put_device(&spi_master->dev);
ERR((KERN_ALERT "[cc2520] - spi_alloc_device() failed\n"));
return -1;
}
spi_device->chip_select = SPI_BUS_CS0;
/* Check whether this SPI bus.cs is already claimed */
snprintf(buff, sizeof(buff), "%s.%u",
dev_name(&spi_device->master->dev),
spi_device->chip_select);
pdev = bus_find_device_by_name(spi_device->dev.bus, NULL, buff);
if (pdev) {
if (pdev->driver != NULL) {
ERR((KERN_INFO
"[cc2520] - Driver [%s] already registered for %s. \
Nuking from orbit.\n",
pdev->driver->name, buff));
}
else {
ERR((KERN_INFO
"[cc2520] - Previous driver registered with no loaded module. \
Nuking from orbit.\n"));
}
device_unregister(pdev);
}
spi_device->max_speed_hz = SPI_BUS_SPEED;
spi_device->mode = SPI_MODE_0;
spi_device->bits_per_word = 8;
spi_device->irq = -1;
spi_device->controller_state = NULL;
spi_device->controller_data = NULL;
strlcpy(spi_device->modalias, cc2520_name, SPI_NAME_SIZE);
status = spi_add_device(spi_device);
if (status < 0) {
spi_dev_put(spi_device);
ERR((KERN_ALERT "[cc2520] - spi_add_device() failed: %d\n",
status));
}
put_device(&spi_master->dev);
return status;
}
开发者ID:CrosseyeJack,项目名称:linux-cc2520-driver,代码行数:67,代码来源:platform.c
示例17: cx_device_unregister
/**
* cx_device_unregister - Unregister a device.
* @cx_dev: part/mfg id for the device
*/
int cx_device_unregister(struct cx_dev *cx_dev)
{
put_device(&cx_dev->dev);
device_unregister(&cx_dev->dev);
return 0;
}
开发者ID:erik96,项目名称:Samsung-Galaxy-S-Plus,代码行数:10,代码来源:tiocx.c
示例18: a6xx_gmu_init
int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
{
struct a6xx_gmu *gmu = &a6xx_gpu->gmu;
struct platform_device *pdev = of_find_device_by_node(node);
int ret;
if (!pdev)
return -ENODEV;
gmu->dev = &pdev->dev;
of_dma_configure(gmu->dev, node, true);
/* Fow now, don't do anything fancy until we get our feet under us */
gmu->idle_level = GMU_IDLE_STATE_ACTIVE;
pm_runtime_enable(gmu->dev);
/* Get the list of clocks */
ret = a6xx_gmu_clocks_probe(gmu);
if (ret)
goto err_put_device;
/* Set up the IOMMU context bank */
ret = a6xx_gmu_memory_probe(gmu);
if (ret)
goto err_put_device;
/* Allocate memory for for the HFI queues */
gmu->hfi = a6xx_gmu_memory_alloc(gmu, SZ_16K);
if (IS_ERR(gmu->hfi))
goto err_memory;
/* Allocate memory for the GMU debug region */
gmu->debug = a6xx_gmu_memory_alloc(gmu, SZ_16K);
if (IS_ERR(gmu->debug))
goto err_memory;
/* Map the GMU registers */
gmu->mmio = a6xx_gmu_get_mmio(pdev, "gmu");
if (IS_ERR(gmu->mmio))
goto err_memory;
/* Get the HFI and GMU interrupts */
gmu->hfi_irq = a6xx_gmu_get_irq(gmu, pdev, "hfi", a6xx_hfi_irq);
gmu->gmu_irq = a6xx_gmu_get_irq(gmu, pdev, "gmu", a6xx_gmu_irq);
if (gmu->hfi_irq < 0 || gmu->gmu_irq < 0)
goto err_mmio;
/*
* Get a link to the GX power domain to reset the GPU in case of GMU
* crash
*/
gmu->gxpd = dev_pm_domain_attach_by_name(gmu->dev, "gx");
/* Get the power levels for the GMU and GPU */
a6xx_gmu_pwrlevels_probe(gmu);
/* Set up the HFI queues */
a6xx_hfi_init(gmu);
gmu->initialized = true;
return 0;
err_mmio:
iounmap(gmu->mmio);
free_irq(gmu->gmu_irq, gmu);
free_irq(gmu->hfi_irq, gmu);
err_memory:
a6xx_gmu_memory_free(gmu, gmu->hfi);
if (gmu->domain) {
iommu_detach_device(gmu->domain, gmu->dev);
iommu_domain_free(gmu->domain);
}
ret = -ENODEV;
err_put_device:
/* Drop reference taken in of_find_device_by_node */
put_device(gmu->dev);
return ret;
}
开发者ID:grate-driver,项目名称:linux,代码行数:86,代码来源:a6xx_gmu.c
示例19: usb_put_intf
/**
* usb_put_intf - release a use of the usb interface structure
* @intf: interface that's been decremented
*
* Must be called when a user of an interface is finished with it. When the
* last user of the interface calls this function, the memory of the interface
* is freed.
*/
void usb_put_intf(struct usb_interface *intf)
{
if (intf)
put_device(&intf->dev);
}
开发者ID:yutokt,项目名称:android_kernel_intel_anzhen4,代码行数:13,代码来源:usb.c
示例20: qeth_perf_procfile_seq_show
static int
qeth_perf_procfile_seq_show(struct seq_file *s, void *it)
{
struct device *device;
struct qeth_card *card;
if (it == SEQ_START_TOKEN)
return 0;
device = (struct device *) it;
card = device->driver_data;
seq_printf(s, "For card with devnos %s/%s/%s (%s):\n",
CARD_RDEV_ID(card),
CARD_WDEV_ID(card),
CARD_DDEV_ID(card),
QETH_CARD_IFNAME(card)
);
if (!card->options.performance_stats)
seq_printf(s, "Performance statistics are deactivated.\n");
seq_printf(s, " Skb's/buffers received : %lu/%u\n"
" Skb's/buffers sent : %lu/%u\n\n",
card->stats.rx_packets -
card->perf_stats.initial_rx_packets,
card->perf_stats.bufs_rec,
card->stats.tx_packets -
card->perf_stats.initial_tx_packets,
card->perf_stats.bufs_sent
);
seq_printf(s, " Skb's/buffers sent without packing : %lu/%u\n"
" Skb's/buffers sent with packing : %u/%u\n\n",
card->stats.tx_packets - card->perf_stats.initial_tx_packets
- card->perf_stats.skbs_sent_pack,
card->perf_stats.bufs_sent - card->perf_stats.bufs_sent_pack,
card->perf_stats.skbs_sent_pack,
card->perf_stats.bufs_sent_pack
);
seq_printf(s, " Skbs sent in SG mode : %u\n"
" Skb fragments sent in SG mode : %u\n\n",
card->perf_stats.sg_skbs_sent,
card->perf_stats.sg_frags_sent);
seq_printf(s, " large_send tx (in Kbytes) : %u\n"
" large_send count : %u\n\n",
card->perf_stats.large_send_bytes >> 10,
card->perf_stats.large_send_cnt);
seq_printf(s, " Packing state changes no pkg.->packing : %u/%u\n"
" Watermarks L/H : %i/%i\n"
" Current buffer usage (outbound q's) : "
"%i/%i/%i/%i\n\n",
card->perf_stats.sc_dp_p, card->perf_stats.sc_p_dp,
QETH_LOW_WATERMARK_PACK, QETH_HIGH_WATERMARK_PACK,
atomic_read(&card->qdio.out_qs[0]->used_buffers),
(card->qdio.no_out_queues > 1)?
atomic_read(&card->qdio.out_qs[1]->used_buffers)
: 0,
(card->qdio.no_out_queues > 2)?
atomic_read(&card->qdio.out_qs[2]->used_buffers)
: 0,
(card->qdio.no_out_queues > 3)?
atomic_read(&card->qdio.out_qs[3]->used_buffers)
: 0
);
seq_printf(s, " Inbound handler time (in us) : %u\n"
" Inbound handler count : %u\n"
" Inbound do_QDIO time (in us) : %u\n"
" Inbound do_QDIO count : %u\n\n"
" Outbound handler time (in us) : %u\n"
" Outbound handler count : %u\n\n"
" Outbound time (in us, incl QDIO) : %u\n"
" Outbound count : %u\n"
" Outbound do_QDIO time (in us) : %u\n"
" Outbound do_QDIO count : %u\n\n",
card->perf_stats.inbound_time,
card->perf_stats.inbound_cnt,
card->perf_stats.inbound_do_qdio_time,
card->perf_stats.inbound_do_qdio_cnt,
card->perf_stats.outbound_handler_time,
card->perf_stats.outbound_handler_cnt,
card->perf_stats.outbound_time,
card->perf_stats.outbound_cnt,
card->perf_stats.outbound_do_qdio_time,
card->perf_stats.outbound_do_qdio_cnt
);
put_device(device);
return 0;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:86,代码来源:qeth_proc.c
注:本文中的put_device函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论