diff options
Diffstat (limited to 'drivers/android/binder.c')
| -rw-r--r-- | drivers/android/binder.c | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index cdfc87629efb..4d2b2ad1ee0e 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c | |||
| @@ -5854,9 +5854,10 @@ static int __init init_binder_device(const char *name) | |||
| 5854 | static int __init binder_init(void) | 5854 | static int __init binder_init(void) |
| 5855 | { | 5855 | { |
| 5856 | int ret; | 5856 | int ret; |
| 5857 | char *device_name, *device_names, *device_tmp; | 5857 | char *device_name, *device_tmp; |
| 5858 | struct binder_device *device; | 5858 | struct binder_device *device; |
| 5859 | struct hlist_node *tmp; | 5859 | struct hlist_node *tmp; |
| 5860 | char *device_names = NULL; | ||
| 5860 | 5861 | ||
| 5861 | ret = binder_alloc_shrinker_init(); | 5862 | ret = binder_alloc_shrinker_init(); |
| 5862 | if (ret) | 5863 | if (ret) |
| @@ -5898,23 +5899,29 @@ static int __init binder_init(void) | |||
| 5898 | &transaction_log_fops); | 5899 | &transaction_log_fops); |
| 5899 | } | 5900 | } |
| 5900 | 5901 | ||
| 5901 | /* | 5902 | if (strcmp(binder_devices_param, "") != 0) { |
| 5902 | * Copy the module_parameter string, because we don't want to | 5903 | /* |
| 5903 | * tokenize it in-place. | 5904 | * Copy the module_parameter string, because we don't want to |
| 5904 | */ | 5905 | * tokenize it in-place. |
| 5905 | device_names = kstrdup(binder_devices_param, GFP_KERNEL); | 5906 | */ |
| 5906 | if (!device_names) { | 5907 | device_names = kstrdup(binder_devices_param, GFP_KERNEL); |
| 5907 | ret = -ENOMEM; | 5908 | if (!device_names) { |
| 5908 | goto err_alloc_device_names_failed; | 5909 | ret = -ENOMEM; |
| 5909 | } | 5910 | goto err_alloc_device_names_failed; |
| 5911 | } | ||
| 5910 | 5912 | ||
| 5911 | device_tmp = device_names; | 5913 | device_tmp = device_names; |
| 5912 | while ((device_name = strsep(&device_tmp, ","))) { | 5914 | while ((device_name = strsep(&device_tmp, ","))) { |
| 5913 | ret = init_binder_device(device_name); | 5915 | ret = init_binder_device(device_name); |
| 5914 | if (ret) | 5916 | if (ret) |
| 5915 | goto err_init_binder_device_failed; | 5917 | goto err_init_binder_device_failed; |
| 5918 | } | ||
| 5916 | } | 5919 | } |
| 5917 | 5920 | ||
| 5921 | ret = init_binderfs(); | ||
| 5922 | if (ret) | ||
| 5923 | goto err_init_binder_device_failed; | ||
| 5924 | |||
| 5918 | return ret; | 5925 | return ret; |
| 5919 | 5926 | ||
| 5920 | err_init_binder_device_failed: | 5927 | err_init_binder_device_failed: |
