static int load_panel_theme(struct panel_theme *theme, struct config_format_tree *tree) { CLEAR_STRUCT(theme); struct config_format_entry *e = find_config_format_entry(&tree->root, "panel"); if (!e) return XERROR("Failed to find 'panel' section in theme format file"); theme->position = PANEL_POSITION_TOP; /* default */ const char *v = find_config_format_entry_value(e, "position"); if (v) theme->position = parse_position(v); theme->background = parse_image_part_named("background", e, tree, 1); if (!theme->background) return -1; theme->separator = parse_image_part_named("separator", e, tree, 0); theme->transparent = parse_bool("transparent", e); theme->align = parse_align("align", e); theme->height = parse_int("height", e, -1); theme->width = parse_int_or_percents("width", e, -1, &theme->width_in_percents); return 0; }
void drm_pvr_dev_remove(void) { DEBUG_PRINTK(KERN_INFO DRV_MSG_PREFIX_STR "%s\n", __FUNCTION__); if (bDeviceIsRegistered) { DEBUG_PRINTK(KERN_INFO DRV_MSG_PREFIX_STR "%s: Unregistering device\n", __FUNCTION__); device_unregister(&pvr_pci_dev.dev); bDeviceIsRegistered = false; /* Prevent kernel warnings on re-register */ CLEAR_STRUCT(pvr_pci_dev); CLEAR_STRUCT(pvr_pci_bus); } else { DEBUG_PRINTK(KERN_WARNING DRV_MSG_PREFIX_STR "%s: Device not registered\n", __FUNCTION__); } }