Changeset 753
- Timestamp:
- Oct 22, 2022, 9:53:37 AM (3 years ago)
- Location:
- GPL/branches/uniaud32-exp
- Files:
-
- 1 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-exp/alsa-kernel/hda/Makefile
r737 r753 13 13 # 14 14 #=================================================================== 15 FILES = hdac_device.obj array.obj hdac_stream.obj hdac_controller.obj hdac_bus.obj hda_bus_type.obj hdac_regmap.obj hdmi_chmap.obj hdac_component.obj 15 FILES = hdac_device.obj array.obj hdac_stream.obj hdac_controller.obj hdac_bus.obj hda_bus_type.obj hdac_regmap.obj hdmi_chmap.obj hdac_component.obj 16 # hdac_i915.obj 16 17 17 18 TARGET = hdac -
GPL/branches/uniaud32-exp/alsa-kernel/include/sound/config.h
r750 r753 32 32 #define CONFIG_SND_HDA_CODEC_CONEXANT 33 33 #define CONFIG_SND_HDA_CODEC_CMEDIA 34 #define CONFIG_SND_HDA_CODEC_HDMI 34 /* #define CONFIG_SND_HDA_CODEC_HDMI not yet supported */ 35 35 #define CONFIG_SND_HDA_CODEC_REALTEK 36 36 #define CONFIG_SND_HDA_CODEC_SIGMATEL … … 40 40 #define CONFIG_SND_HDA_GENERIC 41 41 #define CONFIG_SND_HDA_HWDEP 42 /* #define CONFIG_SND_HDA_I915 not yet supported */ 42 43 #define CONFIG_SND_HDA_PREALLOC_SIZE 64 43 44 #define CONFIG_SND_OSSEMUL -
GPL/branches/uniaud32-exp/include/linux/device.h
r738 r753 300 300 dr_match_t match, void *match_data); 301 301 302 /* devres group */ 303 void * __must_check devres_open_group(struct device *dev, void *id, gfp_t gfp); 304 void devres_close_group(struct device *dev, void *id); 305 void devres_remove_group(struct device *dev, void *id); 306 int devres_release_group(struct device *dev, void *id); 307 302 308 /* debugging and troubleshooting/diagnostic helpers. */ 303 309 extern const char *dev_driver_string(const struct device *dev); -
GPL/branches/uniaud32-exp/include/linux/pci.h
r744 r753 792 792 void pci_release_region(struct pci_dev *, int); 793 793 void __iomem * const *pcim_iomap_table(struct pci_dev *pdev); 794 #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) 794 795 795 796 #endif /* LINUX_PCI_H */ -
GPL/branches/uniaud32-exp/lib32/component.c
r737 r753 185 185 struct component *c; 186 186 187 dev_dbg(adev->parent, "Looking for component % zu\n", i);187 dev_dbg(adev->parent, "Looking for component %lu\n", i); 188 188 189 189 if (match->compare[i].component) … … 243 243 } 244 244 245 #ifndef TARGET_OS2246 245 if (!devres_open_group(adev->parent, adev, GFP_KERNEL)) 247 246 return -ENOMEM; 248 #endif 247 249 248 /* Found all components */ 250 249 ret = adev->ops->bind(adev->parent); 251 250 if (ret < 0) { 252 #ifndef TARGET_OS2253 251 devres_release_group(adev->parent, NULL); 254 252 if (ret != -EPROBE_DEFER) 255 253 dev_info(adev->parent, "adev bind failed: %d\n", ret); 256 #endif257 254 return ret; 258 255 } … … 626 623 * affecting anything else. 627 624 */ 628 #ifndef TARGET_OS2 625 629 626 if (!devres_open_group(adev->parent, NULL, GFP_KERNEL)) 630 627 return -ENOMEM; 631 #endif 628 632 629 /* 633 630 * Also open a group for the device itself: this allows us -
GPL/branches/uniaud32-exp/lib32/devres.c
r744 r753 221 221 } 222 222 223 static int release_nodes(struct device *dev, struct list_head *first, 224 struct list_head *end, unsigned long flags) 225 { 226 // LIST_HEAD(todo); 227 struct list_head todo; 228 229 int cnt; 223 static void release_nodes(struct device *dev, struct list_head *todo) 224 { 230 225 struct devres *dr, *tmp; 231 232 cnt = remove_nodes(dev, first, end, &todo);233 234 spin_unlock_irqrestore(&dev->devres_lock, flags);235 226 236 227 /* Release. Note that both devres and devres_group are 237 228 * handled as devres in the following loop. This is safe. 238 229 */ 239 list_for_each_entry_safe_reverse(dr, tmp, &todo, node.entry, struct devres) {230 list_for_each_entry_safe_reverse(dr, tmp, todo, node.entry, struct devres) { 240 231 devres_log(dev, &dr->node, "REL"); 241 232 dr->node.release(dev, dr->data); 242 233 kfree(dr); 243 234 } 244 245 return cnt;246 235 } 247 236 … … 256 245 { 257 246 unsigned long flags; 247 struct list_head todo; 248 int cnt; 258 249 259 250 /* Looks like an uninitialized device structure */ 260 251 if (WARN_ON(dev->devres_head.next == NULL)) 261 252 return -ENODEV; 253 254 /* Nothing to release if list is empty */ 255 if (list_empty(&dev->devres_head)) 256 return 0; 257 262 258 spin_lock_irqsave(&dev->devres_lock, flags); 263 return release_nodes(dev, dev->devres_head.next, &dev->devres_head, 264 flags); 265 } 259 cnt = remove_nodes(dev, dev->devres_head.next, &dev->devres_head, &todo); 260 spin_unlock_irqrestore(&dev->devres_lock, flags); 261 262 release_nodes(dev, &todo); 263 return cnt; 264 } 265 266 /** 267 * devres_open_group - Open a new devres group 268 * @dev: Device to open devres group for 269 * @id: Separator ID 270 * @gfp: Allocation flags 271 * 272 * Open a new devres group for @dev with @id. For @id, using a 273 * pointer to an object which won't be used for another group is 274 * recommended. If @id is NULL, address-wise unique ID is created. 275 * 276 * RETURNS: 277 * ID of the new group, NULL on failure. 278 */ 279 void * devres_open_group(struct device *dev, void *id, gfp_t gfp) 280 { 281 struct devres_group *grp; 282 unsigned long flags; 283 284 grp = kmalloc(sizeof(*grp), gfp); 285 if (unlikely(!grp)) 286 return NULL; 287 288 grp->node[0].release = &group_open_release; 289 grp->node[1].release = &group_close_release; 290 INIT_LIST_HEAD(&grp->node[0].entry); 291 INIT_LIST_HEAD(&grp->node[1].entry); 292 set_node_dbginfo(&grp->node[0], "grp<", 0); 293 set_node_dbginfo(&grp->node[1], "grp>", 0); 294 grp->id = grp; 295 if (id) 296 grp->id = id; 297 298 spin_lock_irqsave(&dev->devres_lock, flags); 299 add_dr(dev, &grp->node[0]); 300 spin_unlock_irqrestore(&dev->devres_lock, flags); 301 return grp->id; 302 } 303 EXPORT_SYMBOL_GPL(devres_open_group); 304 305 /* Find devres group with ID @id. If @id is NULL, look for the latest. */ 306 static struct devres_group * find_group(struct device *dev, void *id) 307 { 308 struct devres_node *node; 309 310 list_for_each_entry_reverse(node, &dev->devres_head, entry, struct devres_node) { 311 struct devres_group *grp; 312 313 if (node->release != &group_open_release) 314 continue; 315 316 grp = container_of(node, struct devres_group, node[0]); 317 318 if (id) { 319 if (grp->id == id) 320 return grp; 321 } else if (list_empty(&grp->node[1].entry)) 322 return grp; 323 } 324 325 return NULL; 326 } 327 328 /** 329 * devres_release_group - Release resources in a devres group 330 * @dev: Device to release group for 331 * @id: ID of target group, can be NULL 332 * 333 * Release all resources in the group identified by @id. If @id is 334 * NULL, the latest open group is selected. The selected group and 335 * groups properly nested inside the selected group are removed. 336 * 337 * RETURNS: 338 * The number of released non-group resources. 339 */ 340 int devres_release_group(struct device *dev, void *id) 341 { 342 struct devres_group *grp; 343 unsigned long flags; 344 struct list_head todo; 345 int cnt = 0; 346 347 spin_lock_irqsave(&dev->devres_lock, flags); 348 349 grp = find_group(dev, id); 350 if (grp) { 351 struct list_head *first = &grp->node[0].entry; 352 struct list_head *end = &dev->devres_head; 353 354 if (!list_empty(&grp->node[1].entry)) 355 end = grp->node[1].entry.next; 356 357 cnt = remove_nodes(dev, first, end, &todo); 358 spin_unlock_irqrestore(&dev->devres_lock, flags); 359 360 release_nodes(dev, &todo); 361 } else { 362 WARN_ON(1); 363 spin_unlock_irqrestore(&dev->devres_lock, flags); 364 } 365 366 return cnt; 367 } 368 EXPORT_SYMBOL_GPL(devres_release_group); 266 369 267 370 static struct devres *find_dr(struct device *dev, dr_release_t release,
Note:
See TracChangeset
for help on using the changeset viewer.