This function is trivial and is only used in one place. Having this function is misleading because it implies that blk_crypto_register() needs to be paired with blk_crypto_unregister(), which is not the case. Just set disk->queue->crypto_profile to NULL directly.
Showing the changes to include/linux/blkdev.h (1 of 3 files). Show all
Unified · Split
| @@ -1170,8 +1170,6 @@ int kblockd_mod_delayed_work_on(int cpu, struct delayed_work *dwork, unsigned lo · 1169 unmodified lines | ||
| 1170 | 1170 | bool blk_crypto_register(struct blk_crypto_profile *profile, |
| 1171 | 1171 | struct request_queue *q); |
| 1172 | 1172 | |
| 1173 | −void blk_crypto_unregister(struct request_queue *q); | |
| 1174 | − | |
| 1175 | 1173 | #else /* CONFIG_BLK_INLINE_ENCRYPTION */ |
| 1176 | 1174 | |
| 1177 | 1175 | static inline bool blk_crypto_register(struct blk_crypto_profile *profile, |
| @@ -1180,8 +1178,6 @@ static inline bool blk_crypto_register(struct blk_crypto_profile *profile, · 2 unmodified lines | ||
| 1180 | 1178 | return true; |
| 1181 | 1179 | } |
| 1182 | 1180 | |
| 1183 | −static inline void blk_crypto_unregister(struct request_queue *q) { } | |
| 1184 | − | |
| 1185 | 1181 | #endif /* CONFIG_BLK_INLINE_ENCRYPTION */ |
| 1186 | 1182 | |
| 1187 | 1183 | enum blk_unique_id { |