Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

intel_th: Constify all drvdata references

Anything that deals with drvdata structures should leave them intact.
Reflect this in function signatures.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210414171251.14672-4-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alexander Shishkin and committed by
Greg Kroah-Hartman
a525ed17 3fae829e

+5 -5
+1 -1
drivers/hwtracing/intel_th/core.c
··· 844 844 * @irq: irq number 845 845 */ 846 846 struct intel_th * 847 - intel_th_alloc(struct device *dev, struct intel_th_drvdata *drvdata, 847 + intel_th_alloc(struct device *dev, const struct intel_th_drvdata *drvdata, 848 848 struct resource *devres, unsigned int ndevres) 849 849 { 850 850 int err, r, nr_mmios = 0;
+3 -3
drivers/hwtracing/intel_th/intel_th.h
··· 74 74 */ 75 75 struct intel_th_device { 76 76 struct device dev; 77 - struct intel_th_drvdata *drvdata; 77 + const struct intel_th_drvdata *drvdata; 78 78 struct resource *resource; 79 79 unsigned int num_resources; 80 80 unsigned int type; ··· 224 224 } 225 225 226 226 struct intel_th * 227 - intel_th_alloc(struct device *dev, struct intel_th_drvdata *drvdata, 227 + intel_th_alloc(struct device *dev, const struct intel_th_drvdata *drvdata, 228 228 struct resource *devres, unsigned int ndevres); 229 229 void intel_th_free(struct intel_th *th); 230 230 ··· 272 272 273 273 struct intel_th_device *thdev[TH_SUBDEVICE_MAX]; 274 274 struct intel_th_device *hub; 275 - struct intel_th_drvdata *drvdata; 275 + const struct intel_th_drvdata *drvdata; 276 276 277 277 struct resource resource[TH_MMIO_END]; 278 278 int (*activate)(struct intel_th *);
+1 -1
drivers/hwtracing/intel_th/pci.c
··· 71 71 static int intel_th_pci_probe(struct pci_dev *pdev, 72 72 const struct pci_device_id *id) 73 73 { 74 - struct intel_th_drvdata *drvdata = (void *)id->driver_data; 74 + const struct intel_th_drvdata *drvdata = (void *)id->driver_data; 75 75 struct resource resource[TH_MMIO_END + TH_NVEC_MAX] = { 76 76 [TH_MMIO_CONFIG] = pdev->resource[TH_PCI_CONFIG_BAR], 77 77 [TH_MMIO_SW] = pdev->resource[TH_PCI_STH_SW_BAR],