mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-11-01 09:13:37 +00:00 
			
		
		
		
	rpmsg updates for v6.10
This makes core rpmsg_class const and it ensures automatic module loading of the Qualcomm glink_ssr driver happens. -----BEGIN PGP SIGNATURE----- iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmZMDUIVHGFuZGVyc3Nv bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3F49oP/iZhXMYNrFV1B6HuOHBHHsGyXlgp wRDw3Ww3LsVroE6MGCP1BucRG0X6NMJekSY6ekHZqkc342eWqKrLgEaiGMuwHmY6 wiv1ge0ncRO0SvU7qrbBCmWOgx4bH/UQvZcEABXBFLjfrZkijFaqhgA0gWgwJBcH LTHttRRVSqLesuwo9c9V+gChZmMqNHP8sqbtF8NbPIHTLiSzuItqsgE6/ue8fmR9 v1LdQHvfqly5Acu0F7YUS/bq+QVvnwVQElcVv5ImS+5ey1kJ0dQK0H9sKk4tX6R/ zo8K19C91VliW/cniA8Tg8kakop8WmhUdNY5XG2PFiRQLSe0w1zB9jyEnGkDU7rs SHY0U7ajpaJgaiBR82jfu3YFUvx5OHMhueHnhGDJYjM7+OViLAIYQlVvpdX0y0mF c4i5DYbEnps4fKTo8pUAwbVFlX7jQEaDap1ptkPveeilWvJyCCs2xk2HV3+xIuU+ 65bX6B0Pecmx0O4RnfpS91W881t/R/JPOujqY9io4WNkIzjNk1dfRpoklwgTl6BO tr3jxXS3W4hvQLD8fIfZ8jNdxkDw+bIeya9t1QfUWEDC7u/enQD9mqpu4ZSv28r3 FaYoOgvKghvncklVuyjrDaO6zsXI+baY43k6qftd2H/pAAwEqwJvED7hu34f9nt8 h7mq7bHbbEncGZn0 =9WMR -----END PGP SIGNATURE----- Merge tag 'rpmsg-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull rpmsg updates from Bjorn Andersson: "This makes core rpmsg_class const and ensures that the automatic module loading of the Qualcomm glink_ssr driver happens" * tag 'rpmsg-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: rpmsg: qcom_glink_ssr: fix module autoloading rpmsg: core: Make rpmsg_class constant
This commit is contained in:
		
						commit
						e66128fa8e
					
				
					 5 changed files with 13 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -154,6 +154,7 @@ static const struct rpmsg_device_id qcom_glink_ssr_match[] = {
 | 
			
		|||
	{ "glink_ssr" },
 | 
			
		||||
	{}
 | 
			
		||||
};
 | 
			
		||||
MODULE_DEVICE_TABLE(rpmsg, qcom_glink_ssr_match);
 | 
			
		||||
 | 
			
		||||
static struct rpmsg_driver qcom_glink_ssr_driver = {
 | 
			
		||||
	.probe = qcom_glink_ssr_probe,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -423,7 +423,7 @@ static struct rpmsg_eptdev *rpmsg_chrdev_eptdev_alloc(struct rpmsg_device *rpdev
 | 
			
		|||
	init_waitqueue_head(&eptdev->readq);
 | 
			
		||||
 | 
			
		||||
	device_initialize(dev);
 | 
			
		||||
	dev->class = rpmsg_class;
 | 
			
		||||
	dev->class = &rpmsg_class;
 | 
			
		||||
	dev->parent = parent;
 | 
			
		||||
	dev->groups = rpmsg_eptdev_groups;
 | 
			
		||||
	dev_set_drvdata(dev, eptdev);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,7 +20,9 @@
 | 
			
		|||
 | 
			
		||||
#include "rpmsg_internal.h"
 | 
			
		||||
 | 
			
		||||
struct class *rpmsg_class;
 | 
			
		||||
const struct class rpmsg_class = {
 | 
			
		||||
	.name = "rpmsg",
 | 
			
		||||
};
 | 
			
		||||
EXPORT_SYMBOL(rpmsg_class);
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			@ -715,16 +717,16 @@ static int __init rpmsg_init(void)
 | 
			
		|||
{
 | 
			
		||||
	int ret;
 | 
			
		||||
 | 
			
		||||
	rpmsg_class = class_create("rpmsg");
 | 
			
		||||
	if (IS_ERR(rpmsg_class)) {
 | 
			
		||||
		pr_err("failed to create rpmsg class\n");
 | 
			
		||||
		return PTR_ERR(rpmsg_class);
 | 
			
		||||
	ret = class_register(&rpmsg_class);
 | 
			
		||||
	if (ret) {
 | 
			
		||||
		pr_err("failed to register rpmsg class\n");
 | 
			
		||||
		return ret;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ret = bus_register(&rpmsg_bus);
 | 
			
		||||
	if (ret) {
 | 
			
		||||
		pr_err("failed to register rpmsg bus: %d\n", ret);
 | 
			
		||||
		class_destroy(rpmsg_class);
 | 
			
		||||
		class_destroy(&rpmsg_class);
 | 
			
		||||
	}
 | 
			
		||||
	return ret;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -733,7 +735,7 @@ postcore_initcall(rpmsg_init);
 | 
			
		|||
static void __exit rpmsg_fini(void)
 | 
			
		||||
{
 | 
			
		||||
	bus_unregister(&rpmsg_bus);
 | 
			
		||||
	class_destroy(rpmsg_class);
 | 
			
		||||
	class_destroy(&rpmsg_class);
 | 
			
		||||
}
 | 
			
		||||
module_exit(rpmsg_fini);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -150,7 +150,7 @@ static int rpmsg_ctrldev_probe(struct rpmsg_device *rpdev)
 | 
			
		|||
	dev = &ctrldev->dev;
 | 
			
		||||
	device_initialize(dev);
 | 
			
		||||
	dev->parent = &rpdev->dev;
 | 
			
		||||
	dev->class = rpmsg_class;
 | 
			
		||||
	dev->class = &rpmsg_class;
 | 
			
		||||
 | 
			
		||||
	mutex_init(&ctrldev->ctrl_lock);
 | 
			
		||||
	cdev_init(&ctrldev->cdev, &rpmsg_ctrldev_fops);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,7 @@
 | 
			
		|||
#define to_rpmsg_device(d) container_of(d, struct rpmsg_device, dev)
 | 
			
		||||
#define to_rpmsg_driver(d) container_of(d, struct rpmsg_driver, drv)
 | 
			
		||||
 | 
			
		||||
extern struct class *rpmsg_class;
 | 
			
		||||
extern const struct class rpmsg_class;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * struct rpmsg_device_ops - indirection table for the rpmsg_device operations
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue