Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b9844f5 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Wey-Yi Guy
Browse files

iwlwifi: don't use shared for the logger any more



Each modules will hold a pointer to struct device instead.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 93faaeea
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1509,6 +1509,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
	priv = IWL_OP_MODE_GET_DVM(op_mode);
	priv->shrd = trans->shrd;
	priv->trans = trans;
	priv->dev = trans->dev;
	priv->cfg = cfg;
	priv->fw = fw;

+2 −2
Original line number Diff line number Diff line
@@ -481,7 +481,7 @@ do { \
	if (!iwl_is_rfkill((m)))					\
		IWL_ERR(m, fmt, ##args);				\
	else								\
		__iwl_err(trans(m)->dev, true,				\
		__iwl_err((m)->dev, true,				\
			  !iwl_have_debug_level(IWL_DL_RADIO),		\
			  fmt, ##args);					\
} while (0)
@@ -491,7 +491,7 @@ do { \
	if (!iwl_is_rfkill((m)))					\
		IWL_ERR(m, fmt, ##args);				\
	else								\
		__iwl_err(trans(m)->dev, true, true, fmt, ##args);	\
		__iwl_err((m)->dev, true, true, fmt, ##args);	\
} while (0)
#endif				/* CONFIG_IWLWIFI_DEBUG */

+6 −6
Original line number Diff line number Diff line
@@ -41,10 +41,10 @@ void __iwl_info(struct device *dev, const char *fmt, ...);
void __iwl_crit(struct device *dev, const char *fmt, ...);

/* No matter what is m (priv, bus, trans), this will work */
#define IWL_ERR(m, f, a...) __iwl_err(trans(m)->dev, false, false, f, ## a)
#define IWL_WARN(m, f, a...) __iwl_warn(trans(m)->dev, f, ## a)
#define IWL_INFO(m, f, a...) __iwl_info(trans(m)->dev, f, ## a)
#define IWL_CRIT(m, f, a...) __iwl_crit(trans(m)->dev, f, ## a)
#define IWL_ERR(m, f, a...) __iwl_err((m)->dev, false, false, f, ## a)
#define IWL_WARN(m, f, a...) __iwl_warn((m)->dev, f, ## a)
#define IWL_INFO(m, f, a...) __iwl_info((m)->dev, f, ## a)
#define IWL_CRIT(m, f, a...) __iwl_crit((m)->dev, f, ## a)

#if defined(CONFIG_IWLWIFI_DEBUG) || defined(CONFIG_IWLWIFI_DEVICE_TRACING)
void __iwl_dbg(struct device *dev,
@@ -65,9 +65,9 @@ do { \
} while (0)

#define IWL_DEBUG(m, level, fmt, args...)				\
	__iwl_dbg(trans(m)->dev, level, false, __func__, fmt, ##args)
	__iwl_dbg((m)->dev, level, false, __func__, fmt, ##args)
#define IWL_DEBUG_LIMIT(m, level, fmt, args...)				\
	__iwl_dbg(trans(m)->dev, level, true, __func__, fmt, ##args)
	__iwl_dbg((m)->dev, level, true, __func__, fmt, ##args)

#ifdef CONFIG_IWLWIFI_DEBUG
#define iwl_print_hex_dump(m, level, p, len)				\
+1 −0
Original line number Diff line number Diff line
@@ -761,6 +761,7 @@ struct iwl_priv {
	/*data shared among all the driver's layers */
	struct iwl_shared *shrd;
	struct iwl_trans *trans;
	struct device *dev;		/* for debug prints only */
	const struct iwl_cfg *cfg;
	const struct iwl_fw *fw;
	const struct iwl_lib_ops *lib;
+3 −0
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@
 * @shrd: pointer to common shared structure
 * @op_mode: the running op_mode
 * @trans: transport layer
 * @dev: for debug prints only
 * @cfg: configuration struct
 * @fw_index: firmware revision to try loading
 * @firmware_name: composite filename of ucode file to load
@@ -91,6 +92,7 @@ struct iwl_drv {
	struct iwl_shared *shrd;
	struct iwl_op_mode *op_mode;
	struct iwl_trans *trans;
	struct device *dev;
	const struct iwl_cfg *cfg;

	int fw_index;                   /* firmware we're trying to load */
@@ -898,6 +900,7 @@ struct iwl_drv *iwl_drv_start(struct iwl_shared *shrd,
	/* For printing only - temporary until we change the logger */
	drv->shrd = shrd;
	drv->trans = trans;
	drv->dev = trans->dev;
	drv->cfg = cfg;

	init_completion(&drv->request_firmware_complete);
Loading