Usage of counter_register() yields issues in device lifetime tracking. All drivers were converted to the new API, so the old one can go away.
Showing the changes to include (1 of 2 files). Show all
Unified · Split
| @@ -314,8 +314,6 @@ struct counter_device { · 313 unmodified lines | ||
| 314 | 314 | struct counter_comp *ext; |
| 315 | 315 | size_t num_ext; |
| 316 | 316 | |
| 317 | − void *priv; | |
| 318 | − | |
| 319 | 317 | struct device dev; |
| 320 | 318 | struct cdev chrdev; |
| 321 | 319 | struct list_head events_list; |
| @@ -327,25 +325,15 @@ struct counter_device { · 5 unmodified lines | ||
| 327 | 325 | spinlock_t events_in_lock; |
| 328 | 326 | struct mutex events_out_lock; |
| 329 | 327 | struct mutex ops_exist_lock; |
| 330 | − | |
| 331 | − /* | |
| 332 | − * This can go away once all drivers are converted to | |
| 333 | − * counter_alloc()/counter_add(). | |
| 334 | − */ | |
| 335 | − bool legacy_device; | |
| 336 | 328 | }; |
| 337 | 329 | |
| 338 | 330 | void *counter_priv(const struct counter_device *const counter); |
| 339 | 331 | |
| 340 | −int counter_register(struct counter_device *const counter); | |
| 341 | − | |
| 342 | 332 | struct counter_device *counter_alloc(size_t sizeof_priv); |
| 343 | 333 | void counter_put(struct counter_device *const counter); |
| 344 | 334 | int counter_add(struct counter_device *const counter); |
| 345 | 335 | |
| 346 | 336 | void counter_unregister(struct counter_device *const counter); |
| 347 | −int devm_counter_register(struct device *dev, | |
| 348 | − struct counter_device *const counter); | |
| 349 | 337 | struct counter_device *devm_counter_alloc(struct device *dev, |
| 350 | 338 | size_t sizeof_priv); |
| 351 | 339 | int devm_counter_add(struct device *dev, |