The ?summarizeOverlaps man page lists all data types for the 'reads' argument:
reads: A GRanges, GRangesList GAlignments, GAlignmentsList,
GAlignmentPairs, BamViews or BamFileList object that
represents the data to be counted by ‘summarizeOverlaps’.
‘reads’ is missing when a BamViews object is the only
argument supplied to ‘summarizeOverlaps’. ‘reads’ are the
files specified in ‘bamPaths’ of the BamViews object.
Instead of reading the data in first with scanBam() you can provide a ScanBamParam to summarizeOverlaps() as the 'pram' argument. If you want to read the data in for some other reason I would suggest using the readGAlignments() family of functions. See ?readGAlignments in the GenomicAlignments package. The GAlignments or GAlignmentsList class can then be passed to summarizeOverlaps().