Changeset 6610565b in mainline for uspace/drv


Ignore:
Timestamp:
2011-01-10T16:20:56Z (15 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1ffa73b, 8048c648, 8426912a, 977fcea, f401312
Parents:
a97ea0f (diff), 4a5c6c1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

Location:
uspace/drv
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/isa/isa.c

    ra97ea0f r6610565b  
    5151
    5252#include <driver.h>
    53 #include <resource.h>
     53#include <ops/hw_res.h>
    5454
    5555#include <devman.h>
     
    8484}
    8585
    86 static resource_iface_t isa_child_res_iface = {
     86static hw_res_ops_t isa_child_hw_res_ops = {
    8787        &isa_get_child_resources,
    8888        &isa_enable_child_interrupt
     
    502502static void isa_init()
    503503{
    504         isa_child_dev_ops.interfaces[HW_RES_DEV_IFACE] = &isa_child_res_iface;
     504        isa_child_dev_ops.interfaces[HW_RES_DEV_IFACE] = &isa_child_hw_res_ops;
    505505}
    506506
  • uspace/drv/ns8250/ns8250.c

    ra97ea0f r6610565b  
    5353
    5454#include <driver.h>
    55 #include <char.h>
    56 #include <resource.h>
     55#include <ops/char_dev.h>
    5756
    5857#include <devman.h>
     
    227226
    228227/** The character interface's callbacks. */
    229 static char_iface_t ns8250_char_iface = {
     228static char_dev_ops_t ns8250_char_dev_ops = {
    230229        .read = &ns8250_read,
    231230        .write = &ns8250_write
     
    347346       
    348347        /* Get hw resources. */
    349         ret = get_hw_resources(dev->parent_phone, &hw_resources);
     348        ret = hw_res_get_resource_list(dev->parent_phone, &hw_resources);
    350349        if (ret != EOK) {
    351350                printf(NAME ": failed to get hw resources for the device "
     
    394393        }
    395394       
    396         clean_hw_resource_list(&hw_resources);
     395        hw_res_clean_resource_list(&hw_resources);
    397396        return ret;
    398397       
    399398failed:
    400399        ns8250_dev_cleanup(dev);
    401         clean_hw_resource_list(&hw_resources);
     400        hw_res_clean_resource_list(&hw_resources);
    402401        return ret;
    403402}
     
    924923        ns8250_dev_ops.close = &ns8250_close;
    925924       
    926         ns8250_dev_ops.interfaces[CHAR_DEV_IFACE] = &ns8250_char_iface;
     925        ns8250_dev_ops.interfaces[CHAR_DEV_IFACE] = &ns8250_char_dev_ops;
    927926        ns8250_dev_ops.default_handler = &ns8250_default_handler;
    928927}
  • uspace/drv/pciintel/pci.c

    ra97ea0f r6610565b  
    4949#include <ipc/devman.h>
    5050#include <ipc/dev_iface.h>
    51 #include <resource.h>
     51#include <ops/hw_res.h>
    5252#include <device/hw_res.h>
    5353#include <ddi.h>
     
    7777}
    7878
    79 static resource_iface_t pciintel_child_res_iface = {
     79static hw_res_ops_t pciintel_child_hw_res_ops = {
    8080        &pciintel_get_child_resources,
    8181        &pciintel_enable_child_interrupt
     
    473473        hw_resource_list_t hw_resources;
    474474       
    475         rc = get_hw_resources(dev->parent_phone, &hw_resources);
     475        rc = hw_res_get_resource_list(dev->parent_phone, &hw_resources);
    476476        if (rc != EOK) {
    477477                printf(NAME ": pci_add_device failed to get hw resources for "
     
    497497                delete_pci_bus_data(bus_data);
    498498                ipc_hangup(dev->parent_phone);
    499                 clean_hw_resource_list(&hw_resources);
     499                hw_res_clean_resource_list(&hw_resources);
    500500                return EADDRNOTAVAIL;
    501501        }
     
    508508        pci_bus_scan(dev, 0);
    509509       
    510         clean_hw_resource_list(&hw_resources);
     510        hw_res_clean_resource_list(&hw_resources);
    511511       
    512512        return EOK;
     
    515515static void pciintel_init(void)
    516516{
    517         pci_child_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_res_iface;
     517        pci_child_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_child_hw_res_ops;
    518518}
    519519
     
    537537{
    538538        if (dev_data != NULL) {
    539                 clean_hw_resource_list(&dev_data->hw_resources);
     539                hw_res_clean_resource_list(&dev_data->hw_resources);
    540540                free(dev_data);
    541541        }
  • uspace/drv/rootpc/rootpc.c

    ra97ea0f r6610565b  
    5050#include <ipc/devman.h>
    5151#include <ipc/dev_iface.h>
    52 #include <resource.h>
     52#include <ops/hw_res.h>
    5353#include <device/hw_res.h>
    5454
     
    107107}
    108108
    109 static resource_iface_t child_res_iface = {
     109static hw_res_ops_t child_hw_res_ops = {
    110110        &rootpc_get_child_resources,
    111111        &rootpc_enable_child_interrupt
     
    190190static void root_pc_init(void)
    191191{
    192         rootpc_child_ops.interfaces[HW_RES_DEV_IFACE] = &child_res_iface;
     192        rootpc_child_ops.interfaces[HW_RES_DEV_IFACE] = &child_hw_res_ops;
    193193}
    194194
  • uspace/drv/test1/char.c

    ra97ea0f r6610565b  
    3333#include <errno.h>
    3434#include <mem.h>
    35 #include <char.h>
     35#include <ops/char_dev.h>
    3636
    3737#include "test1.h"
     
    4646}
    4747
    48 static char_iface_t char_interface = {
     48static char_dev_ops_t char_dev_ops = {
    4949        .read = &impl_char_read,
    5050        .write = &imp_char_write
     
    5252
    5353device_ops_t char_device_ops = {
    54         .interfaces[CHAR_DEV_IFACE] = &char_interface
     54        .interfaces[CHAR_DEV_IFACE] = &char_dev_ops
    5555};
    5656
Note: See TracChangeset for help on using the changeset viewer.