/drivers/hid/ |
D | hid-picolcd_lcd.c | 30 static int picolcd_get_contrast(struct lcd_device *ldev) in picolcd_get_contrast() argument 32 struct picolcd_data *data = lcd_get_data(ldev); in picolcd_get_contrast() 36 static int picolcd_set_contrast(struct lcd_device *ldev, int contrast) in picolcd_set_contrast() argument 38 struct picolcd_data *data = lcd_get_data(ldev); in picolcd_set_contrast() 54 static int picolcd_check_lcd_fb(struct lcd_device *ldev, struct fb_info *fb) in picolcd_check_lcd_fb() argument 56 return fb && fb == picolcd_fbinfo((struct picolcd_data *)lcd_get_data(ldev)); in picolcd_check_lcd_fb() 68 struct lcd_device *ldev; in picolcd_init_lcd() local 78 ldev = lcd_device_register(dev_name(dev), dev, data, &picolcd_lcdops); in picolcd_init_lcd() 79 if (IS_ERR(ldev)) { in picolcd_init_lcd() 81 return PTR_ERR(ldev); in picolcd_init_lcd() [all …]
|
D | hid-thingm.c | 49 struct led_classdev ldev; member 127 buf[2] = rgb->red.ldev.brightness; in thingm_write_color() 128 buf[3] = rgb->green.ldev.brightness; in thingm_write_color() 129 buf[4] = rgb->blue.ldev.brightness; in thingm_write_color() 146 static void thingm_led_set(struct led_classdev *ldev, in thingm_led_set() argument 149 struct thingm_led *led = container_of(ldev, struct thingm_led, ldev); in thingm_led_set() 163 rgb->red.ldev.name = rgb->red.name; in thingm_init_rgb() 164 rgb->red.ldev.max_brightness = 255; in thingm_init_rgb() 165 rgb->red.ldev.brightness_set = thingm_led_set; in thingm_init_rgb() 168 err = led_classdev_register(&rgb->tdev->hdev->dev, &rgb->red.ldev); in thingm_init_rgb() [all …]
|
/drivers/cpuidle/governors/ |
D | ladder.c | 53 static inline void ladder_do_selection(struct ladder_device *ldev, in ladder_do_selection() argument 56 ldev->states[old_idx].stats.promotion_count = 0; in ladder_do_selection() 57 ldev->states[old_idx].stats.demotion_count = 0; in ladder_do_selection() 58 ldev->last_state_idx = new_idx; in ladder_do_selection() 69 struct ladder_device *ldev = this_cpu_ptr(&ladder_devices); in ladder_select_state() local 71 int last_residency, last_idx = ldev->last_state_idx; in ladder_select_state() 76 ladder_do_selection(ldev, last_idx, 0); in ladder_select_state() 80 last_state = &ldev->states[last_idx]; in ladder_select_state() 98 ladder_do_selection(ldev, last_idx, last_idx + 1); in ladder_select_state() 114 ladder_do_selection(ldev, last_idx, i); in ladder_select_state() [all …]
|
/drivers/leds/ |
D | leds-dac124s085.c | 21 struct led_classdev ldev; member 54 static void dac124s085_set_brightness(struct led_classdev *ldev, in dac124s085_set_brightness() argument 57 struct dac124s085_led *led = container_of(ldev, struct dac124s085_led, in dac124s085_set_brightness() 58 ldev); in dac124s085_set_brightness() 87 led->ldev.name = led->name; in dac124s085_probe() 88 led->ldev.brightness = LED_OFF; in dac124s085_probe() 89 led->ldev.max_brightness = 0xfff; in dac124s085_probe() 90 led->ldev.brightness_set = dac124s085_set_brightness; in dac124s085_probe() 91 ret = led_classdev_register(&spi->dev, &led->ldev); in dac124s085_probe() 102 led_classdev_unregister(&dac->leds[i].ldev); in dac124s085_probe() [all …]
|
D | leds-lp3944.c | 65 #define ldev_to_led(c) container_of(c, struct lp3944_led_data, ldev) 72 struct led_classdev ldev; member 182 __func__, led->ldev.name, status); in lp3944_led_set() 218 __func__, led->ldev.name, reg, id, status, val); in lp3944_led_set() 322 led->ldev.name = pled->name; in lp3944_configure() 323 led->ldev.max_brightness = 1; in lp3944_configure() 324 led->ldev.brightness_set = lp3944_led_set_brightness; in lp3944_configure() 325 led->ldev.blink_set = lp3944_led_set_blink; in lp3944_configure() 326 led->ldev.flags = LED_CORE_SUSPENDRESUME; in lp3944_configure() 329 err = led_classdev_register(&client->dev, &led->ldev); in lp3944_configure() [all …]
|
D | leds-locomo.c | 58 static int locomoled_probe(struct locomo_dev *ldev) in locomoled_probe() argument 62 ret = led_classdev_register(&ldev->dev, &locomo_led0); in locomoled_probe() 66 ret = led_classdev_register(&ldev->dev, &locomo_led1); in locomoled_probe()
|
D | leds-pca9532.c | 33 #define ldev_to_led(c) container_of(c, struct pca9532_led, ldev) 112 b += data->leds[i].ldev.brightness; in pca9532_calcpwm() 309 led_classdev_unregister(&data->leds[i].ldev); in pca9532_destroy_devices() 360 led->ldev.name = led->name; in pca9532_configure() 361 led->ldev.brightness = LED_OFF; in pca9532_configure() 362 led->ldev.brightness_set = pca9532_set_brightness; in pca9532_configure() 363 led->ldev.blink_set = pca9532_set_blink; in pca9532_configure() 365 err = led_classdev_register(&client->dev, &led->ldev); in pca9532_configure()
|
/drivers/lguest/ |
D | lguest_device.c | 262 struct lguest_device *ldev = to_lgdev(vdev); in lg_find_vq() local 271 if (index >= ldev->desc->num_vq) in lg_find_vq() 283 memcpy(&lvq->config, lg_vq(ldev->desc)+index, sizeof(lvq->config)); in lg_find_vq() 375 struct lguest_device *ldev = to_lgdev(vdev); in lg_find_vqs() local 379 if (nvqs > ldev->desc->num_vq) in lg_find_vqs() 434 struct lguest_device *ldev; in add_lguest_device() local 437 ldev = kzalloc(sizeof(*ldev), GFP_KERNEL); in add_lguest_device() 438 if (!ldev) { in add_lguest_device() 445 ldev->vdev.dev.parent = lguest_root; in add_lguest_device() 451 ldev->vdev.id.device = d->type; in add_lguest_device() [all …]
|
/drivers/acpi/ |
D | proc.c | 49 struct device *ldev; in acpi_system_wakeup_device_seq_show() local 52 ldev = get_device(entry->dev); in acpi_system_wakeup_device_seq_show() 53 if (!ldev) in acpi_system_wakeup_device_seq_show() 63 device_may_wakeup(ldev)) ? in acpi_system_wakeup_device_seq_show() 65 ldev->bus ? ldev->bus->name : in acpi_system_wakeup_device_seq_show() 66 "no-bus", dev_name(ldev)); in acpi_system_wakeup_device_seq_show() 67 put_device(ldev); in acpi_system_wakeup_device_seq_show()
|
/drivers/parisc/ |
D | lba_pci.c | 686 struct lba_device *ldev = LBA_DEV(parisc_walk_tree(bus->bridge)); in lba_fixup_bus() local 707 ldev->hba.io_space.name, in lba_fixup_bus() 708 ldev->hba.io_space.start, ldev->hba.io_space.end, in lba_fixup_bus() 709 ldev->hba.io_space.flags); in lba_fixup_bus() 711 ldev->hba.lmmio_space.name, in lba_fixup_bus() 712 ldev->hba.lmmio_space.start, ldev->hba.lmmio_space.end, in lba_fixup_bus() 713 ldev->hba.lmmio_space.flags); in lba_fixup_bus() 715 err = request_resource(&ioport_resource, &(ldev->hba.io_space)); in lba_fixup_bus() 721 if (ldev->hba.elmmio_space.flags) { in lba_fixup_bus() 723 &(ldev->hba.elmmio_space)); in lba_fixup_bus() [all …]
|
/drivers/block/drbd/ |
D | drbd_main.c | 754 dc = rcu_dereference(peer_device->device->ldev->disk_conf); in drbd_send_sync_param() 850 spin_lock_irq(&device->ldev->md.uuid_lock); in _drbd_send_uuids() 852 p->uuid[i] = cpu_to_be64(device->ldev->md.uuid[i]); in _drbd_send_uuids() 853 spin_unlock_irq(&device->ldev->md.uuid_lock); in _drbd_send_uuids() 881 u64 *uuid = device->ldev->md.uuid; in drbd_print_uuids() 905 uuid = device->ldev->md.uuid[UI_BITMAP]; in drbd_gen_and_send_sync_uuid() 932 D_ASSERT(device, device->ldev->backing_bdev); in drbd_send_sizes() 933 d_size = drbd_get_max_capacity(device->ldev); in drbd_send_sizes() 935 u_size = rcu_dereference(device->ldev->disk_conf)->disk_size; in drbd_send_sizes() 938 max_bio_size = queue_max_hw_sectors(device->ldev->backing_bdev->bd_disk->queue) << 9; in drbd_send_sizes() [all …]
|
D | drbd_nl.c | 420 rcu_dereference(peer_device->device->ldev->disk_conf); in highest_fencing_policy() 667 device->ldev->md.uuid[UI_CURRENT] &= ~(u64)1; in drbd_set_role() 680 && device->ldev->md.uuid[UI_BITMAP] == 0) || forced) in drbd_set_role() 683 device->ldev->md.uuid[UI_CURRENT] |= (u64)1; in drbd_set_role() 876 struct drbd_md *md = &device->ldev->md; in drbd_determine_dev_size() 905 prev_first_sect = drbd_md_first_sector(device->ldev); in drbd_determine_dev_size() 906 prev_size = device->ldev->md.md_size_sect; in drbd_determine_dev_size() 907 la_size_sect = device->ldev->md.la_size_sect; in drbd_determine_dev_size() 920 drbd_md_set_sector_offsets(device, device->ldev); in drbd_determine_dev_size() 923 u_size = rcu_dereference(device->ldev->disk_conf)->disk_size; in drbd_determine_dev_size() [all …]
|
D | drbd_receiver.c | 1197 rv = blkdev_issue_flush(device->ldev->backing_bdev, in drbd_flush() 1332 wo = max_allowed_wo(device->ldev, wo); in drbd_bump_write_ordering() 1333 if (device->ldev == bdev) in drbd_bump_write_ordering() 1390 if (blkdev_issue_zeroout(device->ldev->backing_bdev, in drbd_submit_peer_request() 1419 bio->bi_bdev = device->ldev->backing_bdev; in drbd_submit_peer_request() 2320 struct request_queue *q = bdev_get_queue(device->ldev->backing_bdev); in receive_Data() 2467 struct gendisk *disk = device->ldev->backing_bdev->bd_contains->bd_disk; in drbd_rs_c_min_rate_throttle() 2473 c_min_rate = rcu_dereference(device->ldev->disk_conf)->c_min_rate; in drbd_rs_c_min_rate_throttle() 2726 self = device->ldev->md.uuid[UI_BITMAP] & 1; in drbd_asb_recover_0p() 2940 self = device->ldev->md.uuid[UI_CURRENT] & ~((u64)1); in drbd_uuid_compare() [all …]
|
D | drbd_actlog.c | 164 if (!(rw & WRITE) && device->state.disk == D_DISKLESS && device->ldev == NULL) in _drbd_md_sync_page_io() 311 write_al_updates = rcu_dereference(device->ldev->disk_conf)->al_updates; in drbd_al_begin_io_commit() 443 const unsigned int stripes = device->ldev->md.al_stripes; in al_tr_number_to_on_disk_sector() 444 const unsigned int stripe_size_4kB = device->ldev->md.al_stripe_size_4k; in al_tr_number_to_on_disk_sector() 447 unsigned int t = device->al_tr_number % (device->ldev->md.al_size_4k); in al_tr_number_to_on_disk_sector() 456 return device->ldev->md.md_offset + device->ldev->md.al_offset + t; in al_tr_number_to_on_disk_sector() 551 write_al_updates = rcu_dereference(device->ldev->disk_conf)->al_updates; in al_write_transaction() 554 if (drbd_md_sync_page_io(device, device->ldev, sector, WRITE)) { in al_write_transaction() 612 struct drbd_md *md = &device->ldev->md; in drbd_initialize_al() 623 int err = drbd_md_sync_page_io(device, device->ldev, al_base + i * 8, WRITE); in drbd_initialize_al()
|
D | drbd_bitmap.c | 623 static u64 drbd_md_on_disk_bits(struct drbd_backing_dev *ldev) in drbd_md_on_disk_bits() argument 626 if (ldev->md.al_offset == 8) in drbd_md_on_disk_bits() 627 bitmap_sectors = ldev->md.md_size_sect - ldev->md.bm_offset; in drbd_md_on_disk_bits() 629 bitmap_sectors = ldev->md.al_offset - ldev->md.bm_offset; in drbd_md_on_disk_bits() 689 u64 bits_on_disk = drbd_md_on_disk_bits(device->ldev); in drbd_bm_resize() 1009 device->ldev->md.md_offset + device->ldev->md.bm_offset; in bm_page_io_async() 1016 (drbd_md_last_sector(device->ldev) - on_disk_sector + 1)<<9); in bm_page_io_async() 1030 bio->bi_bdev = device->ldev->md_bdev; in bm_page_io_async() 1142 wait_until_done_or_force_detached(device, device->ldev, &ctx->done); in bm_rw()
|
D | drbd_worker.c | 90 if (device->ldev) /* special case: drbd_md_read() during drbd_adm_attach() */ in drbd_md_endio() 511 dc = rcu_dereference(device->ldev->disk_conf); in drbd_rs_controller() 565 device->c_sync_rate = rcu_dereference(device->ldev->disk_conf)->resync_rate; in drbd_rs_number_requests() 953 drbd_uuid_set(device, UI_BITMAP, device->ldev->md.uuid[UI_CURRENT]); in drbd_resync_finished() 970 device->p_uuid[i] = device->ldev->md.uuid[i]; in drbd_resync_finished() 1450 req->private_bio->bi_bdev = device->ldev->backing_bdev; in w_restart_disk_io() 1462 if (!odev->ldev || odev->state.disk == D_DISKLESS) in _drbd_may_sync_now() 1465 resync_after = rcu_dereference(odev->ldev->disk_conf)->resync_after; in _drbd_may_sync_now() 1567 if (!odev || !odev->ldev || odev->state.disk == D_DISKLESS) in drbd_resync_after_valid() 1571 resync_after = rcu_dereference(odev->ldev->disk_conf)->resync_after; in drbd_resync_after_valid() [all …]
|
D | drbd_state.c | 532 fp = rcu_dereference(device->ldev->disk_conf)->fencing; in is_valid_state() 755 fp = rcu_dereference(device->ldev->disk_conf)->fencing; in sanitize_state() 784 if (device->ed_uuid == device->ldev->md.uuid[UI_CURRENT]) { in sanitize_state() 1095 u32 mdf = device->ldev->md.flags & ~(MDF_CONSISTENT|MDF_PRIMARY_IND| in __drbd_set_state() 1113 if (mdf != device->ldev->md.flags) { in __drbd_set_state() 1114 device->ldev->md.flags = mdf; in __drbd_set_state() 1118 drbd_set_ed_uuid(device, device->ldev->md.uuid[UI_CURRENT]); in __drbd_set_state() 1341 device->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) { in after_state_ch() 1355 device->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) { in after_state_ch() 1425 if (device->ldev) { in after_state_ch() [all …]
|
D | drbd_req.c | 562 bdevname(device->ldev->backing_bdev, b)); in drbd_report_io_error() 952 bdi = &device->ldev->backing_bdev->bd_disk->queue->backing_dev_info; in remote_due_to_read_balancing() 1092 rbm = rcu_dereference(device->ldev->disk_conf)->read_balancing; in do_remote_read() 1156 bio->bi_bdev = device->ldev->backing_bdev; in drbd_submit_req_private_bio() 1546 device->ldev->backing_bdev->bd_disk->queue; in drbd_merge_bvec() 1548 bvm->bi_bdev = device->ldev->backing_bdev; in drbd_merge_bvec() 1575 dt = rcu_dereference(device->ldev->disk_conf)->disk_timeout * HZ / 10; in request_timer_fn()
|
D | drbd_int.h | 842 struct drbd_backing_dev *ldev __protected_by(local); 1115 extern void drbd_free_ldev(struct drbd_backing_dev *ldev); 1760 ep = rcu_dereference(device->ldev->disk_conf)->on_io_error; in __drbd_chk_io_error_()
|
D | drbd_debugfs.c | 772 md = &device->ldev->md; in device_data_gen_id_show()
|
/drivers/video/backlight/ |
D | locomolcd.c | 178 static int locomolcd_probe(struct locomo_dev *ldev) in locomolcd_probe() argument 184 locomolcd_dev = ldev; in locomolcd_probe() 186 locomo_gpio_set_dir(ldev->dev.parent, LOCOMO_GPIO_FL_VR, 0); in locomolcd_probe() 202 &ldev->dev, NULL, in locomolcd_probe()
|
/drivers/media/rc/ |
D | fintek-cir.c | 94 static inline void fintek_select_logical_dev(struct fintek_dev *fintek, u8 ldev) in fintek_select_logical_dev() argument 96 fintek_cr_write(fintek, ldev, GCR_LOGICAL_DEV_NO); in fintek_select_logical_dev()
|
D | nuvoton-cir.c | 89 static inline void nvt_select_logical_dev(struct nvt_dev *nvt, u8 ldev) in nvt_select_logical_dev() argument 92 outb(ldev, nvt->cr_efdr); in nvt_select_logical_dev()
|